大侠,帮忙分析一下这个歌手大赛程序。
#include<stdio.h>void main()
{
int score[10];
int i,sum=0,max=score[0],min=score[9];
printf("please input singer's score:\n");
for(i=0;i<10;i++)
{
scanf("%d",&score[i]);
printf("the number %d is\n", i);
printf("%d\n",score[i]);
if(score[i]>max) max=score[i];
if(score[i]<min) min=score[i];
sum+=score[i];
}
printf("The singer's average score is %f \n",(sum-max-min)/8);
}