There are n structure variables, including student number, name and three class results. The information required to output the highest average scores of students. #include <stdio.h> #define N 3struct student{int num;char name[20];float socre[3];float aver;}; void input (struct Student stu[]) {int i;printf ("Çë Ö±ðêäèë¸÷ñ§éúµäðåºñ§ºå£¬ðõãû£¬èýãå¿î³é¼¨\n "); for (i=0;i<n;i++) {scanf ("%d%s%f%f%f ", &stu[i].num,stu[i]. NAME,&STU[I].SOCRE[0],&STU[I].SOCRE[1],&STU[I].SOCRE[2]); Stu[i].aver= (Stu[i].socre[0]+stu[i].socre [1]+stu[i].socre[2])/3;}} struct Student max (struct Student stu[]) {int i,m=0;for (i=0;i<n;i++) if (stu[i].aver>stu[m].aver) M=i;return stu[m ];} void print (struct Student stud) {printf ("\n³é¼¨xî¸ßµäñ§éúê磺\n");p rintf ("ñ§ºå£º%d\nðõãû£º%s\nèýãå¿î³é¼¨£º%5.1f,% 5.1f,%5.1f\næ½¾ù³é¼¨£º%6.2f\n ", stud.num,stud.name,stud.socre[0],stud.socre[1],stud.socre[2],stud.aver);} int main () {struct Student stu[n],*p=stu;input (p);p rint (Max (P)); return 0;}
"C language" has n structure variables, including student number, name and three class results. The information required to output the highest average scores of students.