求五个数的最大数和平均数
#include<stdio.h>#define N 5
main()
{
int i,high=0,sum=0,a[N];
float average;
printf("input everyone's score.\n");
for(i=0;i<N;i++)
{
scanf("%d",a);
sum=sum+a[i];
if (a[i]>high)
high=a[i];
}
average=(float)sum/N;
printf("%f\n",average);
printf("%d\n",high);
}运行之后的最大数和平均数都不对 错哪了