|
|
|
@ -397,8 +397,8 @@ Step 2.2:选择菜单命令 c
|
|
|
|
|
Step 2.3:if c == 1 then ReadScore
|
|
|
|
|
Step 2.4:if c == 2 then AverSumofEveryStudent
|
|
|
|
|
Step 2.5:if c == 3 then AverSumofEveryCourse
|
|
|
|
|
Step 2.6:if c == 4 then SortbyScore
|
|
|
|
|
Step 2.7:if c == 5 then SortbyScore
|
|
|
|
|
Step 2.6:if c == 4 then SortbyScore(Descending)
|
|
|
|
|
Step 2.7:if c == 5 then SortbyScore(Ascending)
|
|
|
|
|
Step 2.8:if c == 6 then AsSortbyNum
|
|
|
|
|
Step 2.9:if c == 7 then SortbyName
|
|
|
|
|
Step 2.10:if c == 8 then SearchbyNum
|
|
|
|
@ -407,9 +407,38 @@ Step 2.12:if c == 10 then StatisticAnalysis
|
|
|
|
|
Step 2.13:if c == 11 then PrintScore
|
|
|
|
|
Step 2.14:if c == 12 then WritetoFile
|
|
|
|
|
Step 2.15:if c == 13 then ReadfromFile
|
|
|
|
|
Step 2.16:if c == 0 then exit
|
|
|
|
|
|
|
|
|
|
![系统模块图](main函数详细实现.drawio.svg)
|
|
|
|
|
|
|
|
|
|
#### ReadScore
|
|
|
|
|
|
|
|
|
|
#### AverSumofEveryStudent
|
|
|
|
|
|
|
|
|
|
#### AverSumofEveryCourse
|
|
|
|
|
|
|
|
|
|
#### SortbyScore
|
|
|
|
|
|
|
|
|
|
#### SortbyScore
|
|
|
|
|
|
|
|
|
|
#### AsSortbyNum
|
|
|
|
|
|
|
|
|
|
#### SortbyName
|
|
|
|
|
|
|
|
|
|
#### SearchbyNum
|
|
|
|
|
|
|
|
|
|
#### SearchbyName
|
|
|
|
|
|
|
|
|
|
#### StatisticAnalysis
|
|
|
|
|
|
|
|
|
|
#### PrintScore
|
|
|
|
|
|
|
|
|
|
#### WritetoFile
|
|
|
|
|
|
|
|
|
|
#### ReadfromFile
|
|
|
|
|
|
|
|
|
|
#### exit
|
|
|
|
|
|
|
|
|
|
## 代码实现
|
|
|
|
|
|
|
|
|
|
// 头文件的使用
|
|
|
|
@ -485,7 +514,7 @@ int main(void)
|
|
|
|
|
break;
|
|
|
|
|
case 3:AverSumofEveryStudent(stu,n,m);
|
|
|
|
|
break;
|
|
|
|
|
case 4:SortbyScore(stu,n,m,Ascending);
|
|
|
|
|
case 4:SortbyScore(stu,n,m,Descending);
|
|
|
|
|
printf("\nSort in descending order by score:\n");
|
|
|
|
|
PrintScore(stu,n,m);
|
|
|
|
|
break;
|
|
|
|
|