#include<stdio.h> struct student{ int num; char name[10]; int score; }; int main(void) { int sum; double average; int i,index,j; struct student students[10],temp; for(i=0;i<10;i++) { scanf("%d",&students[i].num); scanf("%s",students[i].name); scanf("%d",&students[i].score); } for(i=1;i<=10;i++) { sum=sum+students[i].score; average=sum/10; } for(i=0;i<10-1;i++) { index=i; for(j=i+1;j<10;j++) if(students[j].score>students[index].score) index=j; temp=students[index]; students[index]=students[i]; students[i]=temp; } printf("num name average\n"); for(i=0;i<10;i++) printf("The student score:\n"); scanf("%d %s %.2lf\n",students[i].num,students[i].name,students[i].score); return 0; }