|
|
@ -376,23 +376,38 @@ Step 3:如果k与i不相等,每一课的成绩交换,总分,平均分,
|
|
|
|
![lyx4](c4.drawio.svg)
|
|
|
|
![lyx4](c4.drawio.svg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5.
|
|
|
|
5.按选择法将数组num的元素值按从低到高排序
|
|
|
|
````
|
|
|
|
````
|
|
|
|
|
|
|
|
Step 1:利用 for 循环给 i 赋值为0
|
|
|
|
|
|
|
|
Step 2:利用 if 条件判断学号是否致
|
|
|
|
````
|
|
|
|
Step 3:利用二次循环找出所有符合条件件的学
|
|
|
|
6.
|
|
|
|
Step 4:利用 i 件语句能否找到该学生
|
|
|
|
````
|
|
|
|
````
|
|
|
|
|
|
|
|
![排序1](mty5.drawio.svg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6.交换法实现字符串按字典顺序排序
|
|
|
|
````
|
|
|
|
````
|
|
|
|
7.
|
|
|
|
step 1:利用for循环将相邻的两个姓名作比较
|
|
|
|
|
|
|
|
step 2:如果前一个字符串大于后一个,利用for循环交换m门课程的成绩
|
|
|
|
|
|
|
|
step 3:依次交换
|
|
|
|
````
|
|
|
|
````
|
|
|
|
|
|
|
|
![排序2](mty6.drawio.svg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7.按学号查找学生成绩并显示查找结果
|
|
|
|
````
|
|
|
|
````
|
|
|
|
8.
|
|
|
|
Step 1:利用for循环给i赋值为0
|
|
|
|
|
|
|
|
Step 2:利用if条件判断学号是否一致
|
|
|
|
|
|
|
|
Step 3:利用二次循环找出所有符合条件的学生
|
|
|
|
|
|
|
|
Step 4:利用if条件语句能否找到该学生
|
|
|
|
````
|
|
|
|
````
|
|
|
|
|
|
|
|
![查找](mty7.drawio.svg)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8.按姓名的字典顺序排出成绩表
|
|
|
|
|
|
|
|
````
|
|
|
|
|
|
|
|
Step 1:利用for循环给i赋值为0
|
|
|
|
|
|
|
|
Step 2:利用of条件语句和循环判断是否此学生并显示结果
|
|
|
|
````
|
|
|
|
````
|
|
|
|
|
|
|
|
![排序3](mty8.drawio.svg)
|
|
|
|
|
|
|
|
|
|
|
|
9·统计各分数段的学生人数及所占的百分比
|
|
|
|
9·统计各分数段的学生人数及所占的百分比
|
|
|
|
````
|
|
|
|
````
|
|
|
|