检查了好几遍,应该是没问题啊!但是........
float average(float array[5]){
int i;float aver,sum=array[0];
for (i=1;i<5;i++)
sum=sum+array[i];
aver=sum/5;
return(aver);}
mian()
{
float score[5],aver;
int i;
printf("input 5 scores:\n");
for(i=0;i<5;i++)
scanf("%f",&score[i]);
printf("\n");
aver=average(score);
printf("verage score is :%5.2f\n",aver);
}