From 448327de49ee281229211be2fef973c3df85200e Mon Sep 17 00:00:00 2001 From: Cx330 <2011690092@qq.com> Date: Wed, 19 Apr 2023 23:14:42 +0800 Subject: [PATCH] =?UTF-8?q?Cx330=5F=E5=B0=8F=E4=BF=AE=E5=B0=8F=E8=A1=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 83df6e5..0f19ef3 100644 --- a/README.md +++ b/README.md @@ -70,11 +70,33 @@ Input course number(m<=%d): Management for Students' scores 1.Input record 2.Calculate total and average score of every course +3.Calculate total and average score of every student +4.Sort in descending order by score +5.Sort in ascending order by score +6.Sort in ascending order by number +7.Sort in dictionary order by name +8.Search by number +9.Search by name +10.Statistic analysis +11.List record +12.Write to a file +13.Read from a file +0.Exit +Please Input your choice: //用户输入选项后将结果返回到主函数 + ``` -### C3:计算每个学生各门课程的总分和平均分 +### C3: 计算每个学生各门课程的总分和平均分 + +选择菜单命令2,通过学号查找到该学生的结构体,通过结构体找到各科的成绩,然后进行求和和平均 +``` +stu[i].sum+=stu[i].score[j];//求和 +stu[i].aver=stu[i].sum/m;//求平均 +``` ### C4:计算每门课程的总分和平均分 +选择菜单命令3 + ### C5:按每个学生的总分由高到低排出名次表 ### C6:按每个学生的总分由低到高排出名次表