From 5570fb65d52fee75f83d6d5fd17667a2b2250040 Mon Sep 17 00:00:00 2001 From: zhangyu <387881603@qq.com> Date: Sat, 15 Apr 2023 16:34:39 +0800 Subject: [PATCH 1/4] =?UTF-8?q?ZY=5F=E6=98=BE=E7=A4=BA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=B9=B6=E8=8E=B7=E5=BE=97=E8=BE=93=E5=85=A5=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b26e546..dc72918 100644 --- a/README.md +++ b/README.md @@ -153,7 +153,25 @@ int main(void) ``` int Menu(void) { - + int itemSelected; + printf("Management for Studets' scores\n"); + printf("1.Input record\n"); + printf("2.Calculate total and average score of every course\n"); + printf("3.Calculate total and average score of evry students\n"); + printf("4.Sort in descending order by score\n"); + printf("5.Sort in ascending order by score\n"); + printf("6.Sort in ascending order by name\n"); + printf("7.Sort in dictionary order by name\n"); + printf("8.Search by number\n"); + printf("9.Search by name\n"); + printf("10.Statisit analysis\n"); + printf("11.List record\n"); + printf("12.Write to a file\n"); + printf("13.Read from a file\n"); + printf("0.Exit\n"); + printf("Please Input your choice:"); + scanf("%d",&itemSelected); //读入用户输入 + return itemSeleted; } ``` -- 2.34.1 From fd28057d9d9fd499d9c8d92df3602d07d8bd20a6 Mon Sep 17 00:00:00 2001 From: zhangyu <387881603@qq.com> Date: Sat, 15 Apr 2023 16:52:48 +0800 Subject: [PATCH 2/4] =?UTF-8?q?ZY=5F=E6=98=BE=E7=A4=BA=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E5=B9=B6=E8=8E=B7=E5=BE=97=E8=BE=93=E5=85=A5=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index dc72918..6041a31 100644 --- a/README.md +++ b/README.md @@ -154,24 +154,24 @@ int main(void) int Menu(void) { int itemSelected; - printf("Management for Studets' scores\n"); + printf("Management for Students' scores\n"); printf("1.Input record\n"); printf("2.Calculate total and average score of every course\n"); - printf("3.Calculate total and average score of evry students\n"); + printf("3.Calculate total and average score of evry student\n"); printf("4.Sort in descending order by score\n"); printf("5.Sort in ascending order by score\n"); - printf("6.Sort in ascending order by name\n"); + printf("6.Sort in ascending order by number\n"); printf("7.Sort in dictionary order by name\n"); printf("8.Search by number\n"); printf("9.Search by name\n"); - printf("10.Statisit analysis\n"); + printf("10.Statistic analysis\n"); printf("11.List record\n"); printf("12.Write to a file\n"); printf("13.Read from a file\n"); printf("0.Exit\n"); printf("Please Input your choice:"); scanf("%d",&itemSelected); //读入用户输入 - return itemSeleted; + return itemSelected; } ``` -- 2.34.1 From 086f488654ea52af6e1b85ea7221d0ee1970c0ab Mon Sep 17 00:00:00 2001 From: zhangyu <387881603@qq.com> Date: Sat, 15 Apr 2023 17:04:15 +0800 Subject: [PATCH 3/4] =?UTF-8?q?ZY=5F=E8=AE=A1=E7=AE=97=E6=AF=8F=E4=B8=AA?= =?UTF-8?q?=E5=AD=A6=E7=94=9F=E5=90=84=E9=97=A8=E8=AF=BE=E7=A8=8B=E6=80=BB?= =?UTF-8?q?=E5=88=86=E5=92=8C=E5=B9=B3=E5=9D=87=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6041a31..74fc807 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,17 @@ void ReadScore(STU stu[],int n,int m) ``` 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); + } } ``` -- 2.34.1 From a690413caf9c34c35fdf55f464c739736448d146 Mon Sep 17 00:00:00 2001 From: zhangyu <387881603@qq.com> Date: Sat, 15 Apr 2023 17:17:16 +0800 Subject: [PATCH 4/4] =?UTF-8?q?ZY=5F=E8=AE=A1=E7=AE=97=E6=AF=8F=E9=97=A8?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E7=9A=84=E6=80=BB=E5=88=86=E5=92=8C=E5=B9=B3?= =?UTF-8?q?=E5=9D=87=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 74fc807..490cf56 100644 --- a/README.md +++ b/README.md @@ -205,7 +205,21 @@ void AverSumofEveryStudent(STU stu[],int n,int m) ``` void AverSumofEveryCourse(STU stu[],int n,int m) { + int i,j; + float sum[COURSE_NUM],aver[COURSE_NUM]; + /*--------------begin------------*/ + for(j=0;j