求高于平均分的学生学号及成绩(学号和成绩人工输入)

admin2019-03-29  46

问题 求高于平均分的学生学号及成绩(学号和成绩人工输入)

选项

答案double find(int total, int n) { int number, score, average; scanf("%d", &number); if(number != 0){ scanf("%d", &score); average = find(total+score, n+1); if(score >= average) printf("%d:%d\n", number, score); return average; }else{ printf("Average=%d\n", total/n); return total/n; } } int main(int argc, char* argv[]) { find(0, 0); return getchar(); }

解析
转载请注明原文地址:https://kaotiyun.com/show/rxmZ777K
0

相关试题推荐
最新回复(0)