//演示 某学生三门课成绩为语文:90 数学:80 英语:67 编程求总分、平均分
int chinese = 90;
int math = 80;
int english = 67;
int sum = chinese + math + english;
Console.WriteLine("总分是{0},平均分是{1}", chinese + math + english, (chinese + math + english) / 3);
Console.ReadKey();
//演示 某学生三门课成绩为语文:90 数学:80 英语:67 编程求总分、平均分
int chinese = 90;
int math = 80;
int english = 67;
int sum = chinese + math + english;
Console.WriteLine("总分是{0},平均分是{1}", chinese + math + english, (chinese + math + english) / 3);
Console.ReadKey();
本文标题:用编程求平均分、总分
本文链接:https://www.haomeiwen.com/subject/pvujkqtx.html
网友评论