From 839d14ae245830dfe5ca3747939392b891ee6685 Mon Sep 17 00:00:00 2001 From: wuhangkai <2048572486@qq.com> Date: Sun, 23 Apr 2023 20:05:54 +0800 Subject: [PATCH] df --- void | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) 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