ZY-PrintScore

ZY-PrintScore
zhangyu 2 years ago
parent fd6c804976
commit 1e046ecec5

@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created by Flowgorithm 3.4.2 (http://flowgorithm.org) -->
<svg xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" version="1.1" width="2263" height="2604">
<rect x="0" y="0" width="2263" height="2604" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,248 372,323"/>
<polygon fill="#404040" stroke="none" points="372,341 389,310 354,310"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,992 372,2338"/>
<polygon fill="#404040" stroke="none" points="372,2356 389,2325 354,2325"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 217,124 A 62 62, 0, 0 0, 217 248 L 527,248 A 62 62, 0, 0 0, 527 124 Z"/>
<text x="372" y="142" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="372" dy="62" unicode-bidi="embed">PrintScore</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 248,2356 A 62 62, 0, 0 0, 248 2480 L 496,2480 A 62 62, 0, 0 0, 496 2356 Z"/>
<text x="372" y="2374" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="372" dy="62" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,496 372,571"/>
<polygon fill="#404040" stroke="none" points="372,589 389,558 354,558"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,744 372,850"/>
<polygon fill="#404040" stroke="none" points="372,868 389,837 354,837"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 186,341 L 186,496 L 558,496 L 558,341 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="186,372 558,372"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="217,341 217,496"/>
<text x="387" y="390" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="387" dy="62" unicode-bidi="embed">Integer i</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 186,589 L 186,744 L 558,744 L 558,589 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="186,620 558,620"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="217,589 217,744"/>
<text x="387" y="638" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="387" dy="62" unicode-bidi="embed">Integer j</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="620,930 1023,930 1023,1036"/>
<polygon fill="#404040" stroke="none" points="1023,1054 1040,1023 1005,1023"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1023,2139 1023,2232 434,2232 434,1009"/>
<polygon fill="#404040" stroke="none" points="434,992 416,1022 451,1022"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1023,1240 1023,1346"/>
<polygon fill="#404040" stroke="none" points="1023,1364 1040,1333 1005,1333"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1023,1488 1023,1935"/>
<polygon fill="#404040" stroke="none" points="1023,1953 1040,1922 1005,1922"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 682,1054 L 589,1240 L 1364,1240 L 1457,1054 Z"/>
<text x="1023" y="1072" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1023" dy="62" unicode-bidi="embed">Output &quot;%ld\t%s\t&quot;, stu[i].</tspan>
<tspan x="1023" dy="62" unicode-bidi="embed">num, stu[i].name</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1271,1426 1674,1426 1674,1532"/>
<polygon fill="#404040" stroke="none" points="1674,1550 1691,1519 1656,1519"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1674,1736 1674,1829 1085,1829 1085,1505"/>
<polygon fill="#404040" stroke="none" points="1085,1488 1067,1518 1102,1518"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1302,1550 L 1209,1736 L 2046,1736 L 2139,1550 Z"/>
<text x="1674" y="1568" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1674" dy="62" unicode-bidi="embed">Output &quot;%.0f\t&quot;, stu[i].score</tspan>
<tspan x="1674" dy="62" unicode-bidi="embed">[j]</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 837,1364 L 775,1426 L 837,1488 L 1209,1488 L 1271,1426 L 1209,1364 Z"/>
<text x="1023" y="1382" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1023" dy="62" unicode-bidi="embed">j = 0 to m-1</tspan>
</text>
</g>
<text x="1364" y="1320" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1364" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="914" y="1506" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="914" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 651,1953 L 558,2139 L 1395,2139 L 1488,1953 Z"/>
<text x="1023" y="1971" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1023" dy="62" unicode-bidi="embed">Output &quot;%.0f\t%.0f\n&quot;, stu[i].</tspan>
<tspan x="1023" dy="62" unicode-bidi="embed">sum, stu[i].aver</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 186,868 L 124,930 L 186,992 L 558,992 L 620,930 L 558,868 Z"/>
<text x="372" y="886" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="372" dy="62" unicode-bidi="embed">i = 0 to n-1</tspan>
</text>
</g>
<text x="713" y="824" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="713" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="263" y="1010" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="263" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -430,12 +430,6 @@ Step 4:将结果按照舒徐,总分和平均分的顺序进行输出
#### AverSumofEveryCourse
#### SortbyScore
step 1:利用循环将i赋值给k
step 2:用循环从i+1到n-1比较,将较小的赋给k
step 3:如果k与i不相等每一课的成绩交换
step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 sum 的元素值排序](SortbyScore.svg)
#### SortbyScore
@ -445,22 +439,16 @@ step 4:总分,平均分,学号,姓名依次交换
#### SearchbyNum
Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件判断学号是否一致
Step 3:利用二次循环找出所有符合条件的学生
Step 4:利用if条件语句能否找到该学生
![按学号查找学生成绩并显示查找结果](SearchbyNum.svg)
#### SearchbyName
Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件和循环判断是否有此学生并显示结果
![按姓名查找学生成绩并显示查找结果](SearchbyName.svg)
#### StatisticAnalysis
#### PrintScore
Step 1:利用for循环输出学生的学号和姓名
Step 2:利用二次循环输出每位学生的成绩
Step 3:输出学生的总分数和平均分
![打印学生成绩](PrintScore.svg)
#### WritetoFile
#### ReadfromFile

Loading…
Cancel
Save