求平均数的代码,请帮忙看看问题在哪儿
练习写了一段代码求平均数,请帮忙看看问题出在哪儿,多谢。#include<stdio.h>
int Average(int Score[]);
int main()
{
int Score[]={0};
int i=0;
int iAverage=0;
printf("please enter 10 score:\n");
for(i=0;i<10;i++)
{
scanf("%d",&Score[i]);
}
iAverage=Average(Score);
printf("the Average score is:%d\n",iAverage);
return 0;
}
int Average(int Score[])
{
int iSum=0;
int j=0;
for(j=0;j<10;j++)
{
iSum=+Score[j];
}
return iSum/j;
}