From fdefd720c614527b9db9aa1d3fc974f19548106c Mon Sep 17 00:00:00 2001 From: xuzigui <3542624849@qq.com> Date: Tue, 25 Apr 2023 19:53:07 +0800 Subject: [PATCH] =?UTF-8?q?XZG=5FSortbyScore=E6=B5=81=E7=A8=8B=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 1f88bc2..224e980 100644 --- a/README.md +++ b/README.md @@ -438,6 +438,13 @@ tep 4:将结果按照顺序,总分和平均分的顺序进行输出 #### SortbyScore +step 1:利用循环将i赋值给k +step 2:用循环从i+1到n-1比较,将较小的赋给k +step 3:如果k与i不相等,每一课的成绩交换 +step 4:总分,平均分,学号,姓名依次交换 + +![按选择法将数组 sum 的元素值排序](SortbyScore.svg) + #### AsSortbyNum step 1:利用循环将i赋值给k