Рprintf("**********4.数据查询***************\n");Рprintf("**********5.追加学生数据***********\n");Рprintf("**********6.写入数据文件***********\n");Рprintf("**********7.退出系统***************\n");Рwhile(flag)Р{printf("你想进行的操作:");Рscanf("%d",&n);Рswitch(n)Р{Рcase 1:Inistplayer(a,N);break;Рcase 2:srand((unsigned)time(NULL));Р for(i=0;i<N;i++)Р {Р printf("%d位选手的成绩:",i+1);Р Inputscore(a[i].score,M);Р for(j=0;j<M;j++)Р printf("%d ",a[i].score[j]);Р printf("\n");Р }Р break;Рcase 3:for(i=0;i<N;i++)Р {Max[i]=a[i].score[0];Р Min[i]=a[i].score[0];Р for(j=0;j<M;j++)Р {Р sum[i]+=a[i].score[j];Р if(Max[i]<a[i].score[j]) Max[i]=a[i].score[j];Р if(Min[i]>a[i].score[j]) Min[i]=a[i].score[j];Р }Р aver[i]=(float)(sum[i]-Max[i]-Min[i])/(M-2);Р }Р sort(a,aver,N);Р for(i=0;i<N;i++)Р printf("%s %5.2f\n",a[i].name,aver[i]);Р break;