diff --git a/void b/void index 51cb4ec..4c05a94 100644 --- a/void +++ b/void @@ -1,16 +1,14 @@ -// 函数功能:计算每个学生各门课程的总分和平均分 -void AverSumofEveryStudent(STU stu[], int n, int m) +// 函数功能:输入n个学生的m门课成绩 +void ReadScore(STU stu[], int n, int m) { - int i, j; - for (i=0; i0 ? stu[i].sum / m : -1; - printf("student %d: sum = %.0f, aver = %.0f\n", -i+1, stu[i].sum, stu[i].aver); - } -} + int i, j; + printf("Input student's ID, name and score:\n"); + /* ---------- begain ---------- */ + for(i=0;i