为什么会出现这个错误
#include <stdio.h>
int sum_score(int string[])
{
int sum=0;
int i=0;
for(i=0;i<10;i++)
{
sum=sum+string[i];
}
return sum;
}
int main()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
sum_score(score);
printf("总分是:%d",sum);
return 0;
}
#include <stdio.h>
int sum_score(int string[])
{
int sum=0;
int i=0;
for(i=0;i<10;i++)
{
sum=sum+string[i];
}
return sum;
}
int main()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
sum_score(score);
printf("总分是:%d",sum);
return 0;
}
2019-08-19
举报