ntf("Inputstudent'sID,nameandscore:\n");for(i=0;i<n;i++){scanf("%ld%s",&stu[i].num,stu[i].name);for(j=0;j<m;j++){scanf("%f",&stu[i].score[j]);}}}/*AverSumofEveryStudent:计算每个学生每门课的总分和平均分*/voidAverSumofEveryStudent(STUstu[],intn,intm){inti,j;for(i=0;i<n;i++){stu[i].sum=0;for(j=0;j<m;j++){stu[i].sum=stu[i].sum+stu[i].score[j];}stu[i].aver=m>0?stu[i].sum/m:-1;printf("student%d:sum=%.0f,aver=%.0f\n",i+1,stu[i].sum,stu[i].aver);}}/*AverSumofEveryCourse:计算每门课程的总分和平均分*/voidAverSumofEveryCourse(STUstu[],intn,intm){inti,j;floatsum[6],aver[6];for(j=0;j<m;j++){sum[j]=0;for(i=0;i<n;i++){sum[j]=sum[j]+stu[i].score[j];}aver[j]=n>0?sum[j]/n:-1;printf("course%d:sum=%.0f,aver=%.0f\n",j+1,sum[j],aver[j]);}}/*SortbyScore:将每个学生按总成绩排序*/voidSortbyScore(STUstu[],intn,intm,int(*compare)(floata,floatb)){inti,j,k,t;