From e17db051743885447027cdecdd496463ada4f9a6 Mon Sep 17 00:00:00 2001 From: zhouyufan <2467848647@qq.com> Date: Sun, 21 May 2023 16:09:45 +0800 Subject: [PATCH] =?UTF-8?q?c2=E5=87=BD=E6=95=B0=E4=BB=A3=E7=A0=81zyf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- c2函数功能 | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 c2函数功能 diff --git a/c2函数功能 b/c2函数功能 new file mode 100644 index 0000000..a4cea01 --- /dev/null +++ b/c2函数功能 @@ -0,0 +1,16 @@ +//2 函数功能:计算每个学生各门课程的总分和平均分 +void AverSumofEveryStudent(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); + } +} \ No newline at end of file