问题描述:
请用C语言编写一下程序,
定义一个函数,功能是计算10个学生的成绩中,高于平均成绩的人数,并作为函数返回值.用主函数来调用它,统计10个学生成绩中,高于平均成绩的有多少人?
输出:enter scores:
输入:100.0 80.5 80.5 80.5 90.5 80.5 80.5 90.5 80.5 80.5
输出:the number of students who's Scores were higher than average is :3
注:输入输出语句如下,请参考使用:
printf("enter scores:\n");
scanf("%f",&a[i]);
printf("the number of students who's Scores were higher than average is :%d\n",count);
定义一个函数,功能是计算10个学生的成绩中,高于平均成绩的人数,并作为函数返回值.用主函数来调用它,统计10个学生成绩中,高于平均成绩的有多少人?
输出:enter scores:
输入:100.0 80.5 80.5 80.5 90.5 80.5 80.5 90.5 80.5 80.5
输出:the number of students who's Scores were higher than average is :3
注:输入输出语句如下,请参考使用:
printf("enter scores:\n");
scanf("%f",&a[i]);
printf("the number of students who's Scores were higher than average is :%d\n",count);
问题解答:
我来补答展开全文阅读