C语言编程题,输入10个成绩,求平均成绩,把低于平均成绩的打印出来,用调用函数的方法,2个子函数

来源:百度知道 编辑:UC知道 时间:2024/06/03 12:25:20
谢谢啦,帮帮忙啦,我很急

#include<stdio.h>
#define N 10
int AverageScore(int Score[N])
{
int Score[N];
int StudentAverageScore=60;/*初值为60*/
int SumScore=600;/*初值为600*/
int Count=0;
for(Count=0;Count<N;Count++){
Sum=Sum+Score[Count];
}
StudentAverageScore=Sum/N;
return StudentAverageScore;
}

int PrintStudentsLowerAverageScore(Score[N])
{
int Score[N];
int Count=0;
int StudentAverageScore=AverageScore(Score[N]);
for(Count=0;Count<N;Count++){
if(Score[Count]<StudentAverageScore)printf("%d\n",Score[Count]);
}
return 1;
}

int main(void)
{
int Count=0;
int Score[N];
int StudentAverageScore=60;
printf("Please input the scores");
for(Count=0;Count<N;Count++){
scanf("%d",&Score[Count]);
}
StudentAverageScore=AverageScore(Score[N]);
printf("The Aver