Cx330_小修小补

XZG_main函数详细实现流程图
Cx330 2 years ago
parent 7458a3c62b
commit 448327de49

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

Loading…
Cancel
Save