#include
struct Student
{
char ID[15];
char Name[10];
int CScore;
}stu[6], MaxScore;
int main()
{
int sum = 0; //记录总成绩
float aver; //记录平均值
MaxScore.CScore = 0;
for (int i = 0; i < 6; i++)
{
scanf("%s %s %d", stu[i].ID, stu[i].Name, &stu[i].CScore);
sum += stu[i].CScore;
if (MaxScore.CScore < stu[i].CScore)
{
MaxScore = stu[i];
}
}
aver = sum * 1.0 / 6;
printf("The max score student name is : %s, average score is : %.2f\n", MaxScore.Name, aver);
return 0;
}
//测试样例:
//2018010901 麒麟 67
//2018010902 白虎 68
//2018010903 朱雀 86
//2018010904 玄武 99
//2018010905 青龙 61
//2018010906 冬雪 75
//The max score student name is : 玄武, average score is : 76.00