[求助]定义函数求平均数结果不对
#include&lt;stdio.h&gt;<BR>void main()<BR>{float average(float array[],int n);<BR>float score_1[5];<BR>int i;<BR>for(i=0;i&lt;5;i++);<BR>scanf("%f",&amp;score_1[i]);<BR>printf("%f\n",average(score_1,5));<BR>}<BR>float average(float array[],int n)<BR>{<BR>&nbsp;int i;<BR>&nbsp;float average,sum=array[0];<BR>&nbsp;for(i=1;i&lt;n;i++)<BR>&nbsp;&nbsp;sum=sum+array[i];<BR>&nbsp;average=sum/n;<BR>&nbsp;return(average);<BR>}