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:按每个学生的总分由低到高排出名次表