结构推理 从键盘任意输入某班10个学生的成绩,计算总成绩并统计成绩不及格的学生人数,要求用一维数组做函数参数,在函数中实现输出总成绩及不及格的学生人数。
【正确答案】#include void FindFail(int score[], int n); main() { int score[10], i; printf("Please enter the score:/n"); for (i=0; i<10; i++) { scanf("/%d", &score[i]); } FindFail(score, 10); } void FindFail(int score[],int n) { int i; int sum = 0, count = 0; for (i=0; i
【答案解析】