-
慕用4063026
#include <stdio.h>
int zonshu(int score[]); //这里要进行声明
main()
{
int score[10]={67,98,75,63,82,79,81,91,66,84};
int a=zonshu(score);
printf("%d",a);
return 0; //这里加上正确返回
}
int zonshu(int score[])
{
int i;
int sum;
for(i=0;i<10;i++)
{
sum=sum+score[i];
}
return sum;
}输出:33533
-
qq_缘定三生石
include <stdio.h>int zonshu(int score[]){ int i; int sum; for(i=0;i<10;i++) { sum=sum+score[i]; } return sum;}int main(){ int score[10]={67,98,75,63,82,79,81,91,66,84}; int a=zonshu(score); printf("%d",a);}
-
qq_缘定三生石
include<stdio.h>int main(){ int score[10]={67,98,75,63,82,79,81,91,66,84}; int a=zonshu(score); printf("%d",a);}int zonshu(int score[]){ int i; int sum; for(i=0;i<10;i++) { sum=sum+score[i]; } return sum;}
-
在下薛步桧
初学,但是看到一个。main。应该写 int main()吧