From 6231c08624ffca557a00e5358e0d1963b1136e58 Mon Sep 17 00:00:00 2001 From: tong tong zhang Date: Sat, 22 Apr 2023 20:36:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index fabe634..350dc7c 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,22 @@ i+1, stu[i].sum, stu[i].aver); } } //3 函数功能:计算每门课程的总分和平均分 - +void AverSumofEveryCourse(STU stu[], int n, int m) +{ + int i, j; + float sum[COURSE_NUM], aver[COURSE_NUM]; + for (j=0; j b; } // 7交换两个单精度浮点型数据 - +void SwapFloat(float *x, float *y) +{ +float temp; +temp = *x; +*x = *y; +*y = temp; +} // 8交换两个长整型数据 // 9交换两个字符串 @@ -170,7 +191,19 @@ strcpy(x, y); strcpy(y, temp); } // 10函数功能:按选择法将数组num的元素值按从低到高排序 - +void AsSortbyNum(STU stu[], int n, int m) +{ + int i, j, k, t; + for (i=0; i