哪里错了?谢谢
int sum(int arr[])
{
int i;
int sum=0;
for(i=0;i<10;i++)
{
sum+=arr[i];
}
return sum;
}
int main()
{
int score[]={67,98,75,63,82,79,81,91,66,84};
printf("%d",sum(score[]));
return 0;
}
int sum(int arr[])
{
int i;
int sum=0;
for(i=0;i<10;i++)
{
sum+=arr[i];
}
return sum;
}
int main()
{
int score[]={67,98,75,63,82,79,81,91,66,84};
printf("%d",sum(score[]));
return 0;
}
2018-09-30
举报