|
|
|
@ -152,63 +152,63 @@ c6:计算每门课程的总分和平均分
|
|
|
|
|
C9: 姓名顺序排序
|
|
|
|
|
选择菜单命令 7 ,按姓名的字典顺序进行排序,显示提示信息,最后打印学生信息。
|
|
|
|
|
````
|
|
|
|
|
Please Input your choice: 7
|
|
|
|
|
Sort in dictionary order by name:
|
|
|
|
|
2214111025 LiYujia 75 89 100 264 88
|
|
|
|
|
2214111009 XuZigui 77 89 99 265 88
|
|
|
|
|
2214111006 XuZilin 100 95 86 281 93
|
|
|
|
|
2214111011 ZhangYu 85 91 98 274 91
|
|
|
|
|
请输入你的选择: 7
|
|
|
|
|
按名称按字典顺序排序:
|
|
|
|
|
2214111018 LiYuxuan 75 89 100 264 88
|
|
|
|
|
2214111022 ZhouYufan 77 89 99 265 88
|
|
|
|
|
2214111026 MengTingyu 100 95 86 281 93
|
|
|
|
|
2214111038 ZhangTongtong 85 91 98 274 91
|
|
|
|
|
````
|
|
|
|
|
C10: 学生信息查询
|
|
|
|
|
选择菜单命令 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!
|
|
|
|
|
请输入你的选择: 8
|
|
|
|
|
输入你想搜寻的学号:2214111018
|
|
|
|
|
2214111018 LiYuxuan 75 89 100 264 88
|
|
|
|
|
1 输入成绩
|
|
|
|
|
2 计算每门课程的总分和平均分
|
|
|
|
|
3 计算每名学生的总分和平均分
|
|
|
|
|
4 按分数降序排序
|
|
|
|
|
5 按分数升序排序
|
|
|
|
|
6 按学号升序排序
|
|
|
|
|
7 按名称按字典顺序排序
|
|
|
|
|
8 按数字搜索
|
|
|
|
|
9 按名字搜索
|
|
|
|
|
10 统计分析
|
|
|
|
|
11 列表记录
|
|
|
|
|
12 写一个文件
|
|
|
|
|
13 从文件中读取
|
|
|
|
|
0 退出
|
|
|
|
|
请输入你的选择: 8
|
|
|
|
|
输入你想搜寻的学号:2214111001
|
|
|
|
|
没有找到!
|
|
|
|
|
选择菜单命令 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
|
|
|
|
|
请输入你的选择: 9
|
|
|
|
|
输入你想搜寻的名字:ZhangTongtong
|
|
|
|
|
2214111038 ZhangTongtong 85 91 98 274 91
|
|
|
|
|
1 输入分数
|
|
|
|
|
2 计算每门课程的总分和平均分
|
|
|
|
|
3 计算每名学生的总分和平均分
|
|
|
|
|
4 按分数降序排序
|
|
|
|
|
5 按分数升序排序
|
|
|
|
|
6 按学号升序排序
|
|
|
|
|
7 按名称按字典顺序排序
|
|
|
|
|
8 通过学号搜索
|
|
|
|
|
9 通过姓名搜素
|
|
|
|
|
10 统计分析
|
|
|
|
|
11 列表记录
|
|
|
|
|
12 写一个文件
|
|
|
|
|
13 从文件中读取
|
|
|
|
|
0 退出
|
|
|
|
|
请输入你的选择: 9
|
|
|
|
|
请输入你想搜索的名字:GuoJiahui
|
|
|
|
|
Not found!
|
|
|
|
|
````
|
|
|
|
|
C11: 统计各分数段学生人数及所占百分比
|
|
|
|
|
选择菜单命令 10,提示输入学生成绩,通过循环得出各分数段学生人数及所占百分比
|
|
|
|
|
````
|
|
|
|
|
Please Input your choice: 10
|
|
|
|
|
For course 1:
|
|
|
|
|
请输入你的选择: 10
|
|
|
|
|
关于课程1:
|
|
|
|
|
<60 0 0.00%
|
|
|
|
|
60-70 0 0.00%
|
|
|
|
|
70-80 2 50.00%
|
|
|
|
|