|
|
|
@ -151,5 +151,67 @@ Sort in dictionary order by name:
|
|
|
|
|
|
|
|
|
|
### C10: 学生信息查询
|
|
|
|
|
|
|
|
|
|
选择菜单命令 8 ,按学号查找学生成绩并显示查找结果。
|
|
|
|
|
- 选择菜单命令 8 ,提示输入学生学号,若该学号存在,则输出学生信息;否则提示没有找到并结束。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Please Input your choice: 8
|
|
|
|
|
Input the number you want to search:2214111011
|
|
|
|
|
2214111011 ZhangYu 85 91 98 274 91
|
|
|
|
|
|
|
|
|
|
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: 8
|
|
|
|
|
Input the number you want to search:2214111001
|
|
|
|
|
Not found!
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
- 选择菜单命令 9 ,提示输入学生姓名,若该姓名存在,则输出学生信息;否则提示没有找到并结束。
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Please Input your choice: 9
|
|
|
|
|
Input the name you want to search:LiYujia
|
|
|
|
|
2214111025 LiYujia 75 89 100 264 88
|
|
|
|
|
|
|
|
|
|
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: 9
|
|
|
|
|
Input the name you want to search:SunYizhe
|
|
|
|
|
Not found!
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### C11: 统计各分数段学生人数及所占百分比
|
|
|
|
|
|
|
|
|
|
选择菜单命令 10,提示输入学生成绩,通过循环得出各分数段学生人数及所占百分比
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
Please Input your choice: 10
|
|
|
|
|
For course 1:
|
|
|
|
|
```
|
|
|
|
|