Compare commits

..

No commits in common. 'master' and 'XZG_AverSumofEveryCourse流程图' have entirely different histories.

@ -1,150 +0,0 @@
<?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="2666" height="3813">
<rect x="0" y="0" width="2666" height="3813" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,248 837,323"/>
<polygon fill="#404040" stroke="none" points="837,341 854,310 819,310"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,2201 837,3547"/>
<polygon fill="#404040" stroke="none" points="837,3565 854,3534 819,3534"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 682,124 A 62 62, 0, 0 0, 682 248 L 992,248 A 62 62, 0, 0 0, 992 124 Z"/>
<text x="837" y="142" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">WritetoFile</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 713,3565 A 62 62, 0, 0 0, 713 3689 L 961,3689 A 62 62, 0, 0 0, 961 3565 Z"/>
<text x="837" y="3583" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,496 837,571"/>
<polygon fill="#404040" stroke="none" points="837,589 854,558 819,558"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,744 837,819"/>
<polygon fill="#404040" stroke="none" points="837,837 854,806 819,806"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,1736 837,1811"/>
<polygon fill="#404040" stroke="none" points="837,1829 854,1798 819,1798"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,1953 837,2059"/>
<polygon fill="#404040" stroke="none" points="837,2077 854,2046 819,2046"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 651,341 L 651,496 L 1023,496 L 1023,341 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="651,372 1023,372"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="682,341 682,496"/>
<text x="852" y="390" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="852" dy="62" unicode-bidi="embed">Integer i</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 651,589 L 651,744 L 1023,744 L 1023,589 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="651,620 1023,620"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="682,589 682,744"/>
<text x="852" y="638" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="852" dy="62" unicode-bidi="embed">Integer j</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1271,1085 1488,1085 1488,1377"/>
<polygon fill="#404040" stroke="none" points="1488,1395 1505,1364 1470,1364"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1488,1581 1488,1705 885,1705"/>
<polygon fill="#404040" stroke="none" points="868,1705 898,1722 898,1687"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="403,1085 155,1085 155,1705 788,1705"/>
<polygon fill="#404040" stroke="none" points="806,1705 775,1687 775,1722"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 837,837 L 372,1085 L 837,1333 L 1302,1085 Z"/>
<text x="837" y="1010" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">(fp = fopen(&quot;student.txt&quot;,</tspan>
<tspan x="837" dy="62" unicode-bidi="embed"> &quot;w&quot;)) == NULL</tspan>
</text>
</g>
<g>
<path fill="#D0FFD0" stroke="#70A070" stroke-width="4" stroke-dasharray="none" d="M 1178,1395 L 1085,1581 L 1798,1581 L 1891,1395 Z"/>
<text x="1488" y="1413" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1488" dy="62" unicode-bidi="embed">Output &quot;Failure to open</tspan>
<tspan x="1488" dy="62" unicode-bidi="embed"> score.txt!\n&quot;</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="837" cy="1705" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="1395" y="979" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1395" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="263" y="979" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="263" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 465,1829 L 403,1953 L 1209,1953 L 1271,1829 Z"/>
<text x="837" y="1847" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">Output fp, &quot;%d\t%d\n&quot;, n, m</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,2139 1488,2139 1488,2245"/>
<polygon fill="#404040" stroke="none" points="1488,2263 1505,2232 1470,2232"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1488,3348 1488,3441 899,3441 899,2218"/>
<polygon fill="#404040" stroke="none" points="899,2201 881,2231 916,2231"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1488,2449 1488,2555"/>
<polygon fill="#404040" stroke="none" points="1488,2573 1505,2542 1470,2542"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1488,2697 1488,3144"/>
<polygon fill="#404040" stroke="none" points="1488,3162 1505,3131 1470,3131"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1116,2263 L 1023,2449 L 1860,2449 L 1953,2263 Z"/>
<text x="1488" y="2281" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1488" dy="62" unicode-bidi="embed">Output fp, &quot;%10ld%10s&quot;, stu</tspan>
<tspan x="1488" dy="62" unicode-bidi="embed">[i].num, stu[i].name</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1736,2635 2108,2635 2108,2741"/>
<polygon fill="#404040" stroke="none" points="2108,2759 2125,2728 2090,2728"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2108,2945 2108,3038 1550,3038 1550,2714"/>
<polygon fill="#404040" stroke="none" points="1550,2697 1532,2727 1567,2727"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1767,2759 L 1674,2945 L 2449,2945 L 2542,2759 Z"/>
<text x="2108" y="2777" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2108" dy="62" unicode-bidi="embed">Output fp, &quot;%10.0f&quot;, stu[i].</tspan>
<tspan x="2108" dy="62" unicode-bidi="embed">score[j]</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 1302,2573 L 1240,2635 L 1302,2697 L 1674,2697 L 1736,2635 L 1674,2573 Z"/>
<text x="1488" y="2591" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1488" dy="62" unicode-bidi="embed">j = 0 to m-1</tspan>
</text>
</g>
<text x="1829" y="2529" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1829" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="1379" y="2715" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1379" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1147,3162 L 1054,3348 L 1829,3348 L 1922,3162 Z"/>
<text x="1488" y="3180" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1488" dy="62" unicode-bidi="embed">Output fp, &quot;%10.0f%10.0f\</tspan>
<tspan x="1488" dy="62" unicode-bidi="embed">n&quot;, stu[i].sum, stu[i].aver</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 651,2077 L 589,2139 L 651,2201 L 1023,2201 L 1085,2139 L 1023,2077 Z"/>
<text x="837" y="2095" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">i = 0 to n-1</tspan>
</text>
</g>
<text x="1178" y="2033" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="728" y="2219" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="728" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 9.8 KiB

@ -1,109 +0,0 @@
<?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>

Before

Width:  |  Height:  |  Size: 7.0 KiB

@ -429,86 +429,55 @@ Step 4:将结果按照顺序,总分和平均分的顺序进行输出
#### AverSumofEveryCourse
Step 1:利用for循环给 sum 赋初值为 0
step 1:利用for循环给 sum 赋初值为 0
Step 2:利用第二重循环重新计算每门课程的总分
Step 3:计算每门课程的平均分
Step 4:将结果按照顺序,总分和平均分的顺序进行输出
tep 4:将结果按照顺序,总分和平均分的顺序进行输出
![计算每门课程的总分和平均分](AverSumofEveryCourse.svg)
#### SortbyScore
Step 1:利用循环将i赋值给k
Step 2:用循环从i+1到n-1比较,将较小的赋给k
Step 3:如果k与i不相等每一课的成绩交换
Step 4:总分,平均分,学号,姓名依次交换
step 1:利用循环将i赋值给k
step 2:用循环从i+1到n-1比较,将较小的赋给k
step 3:如果k与i不相等每一课的成绩交换
step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 sum 的元素值排序](SortbyScore.svg)
#### AsSortbyNum
#### SortbyScore
Step 1:利用循环将i赋值给k
Step 2:用循环从i+1到n-1比较,将较小的学号赋给k
Step 3:如果k与i不相等每一课的成绩交换
Step 4:总分,平均分,学号,姓名依次交换
#### AsSortbyNum
![按选择法将数组 num 的元素从低到高排序](AsSortbyNum.svg)
step 1:利用循环将i赋值给k
step 2:用循环从i+1到n-1比较,将较小的学号赋给k
step 3:如果k与i不相等每一课的成绩交换
step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 num 的元素从低到高排序](AsScortNum.svg)
#### SortbyName
Step 1:利用for循环将相邻的两个姓名作比较
Step 2:如果前一个字符串大于后一个利用for循环交换m门课程的成绩
Step 3:依次交换
![交换法实现字符串按字典顺序排序](SortbyName.svg)
#### SearchbyNum
Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件判断学号是否一致
Step 3:利用二次循环找出所有符合条件的学生
Step 4:利用if条件语句能否找到该学生
![按学号查找学生成绩并显示查找结果](SearchbyNum.svg)
![按学号查找学生成绩并显示查找结果](SearchbyNum.svg)
#### SearchbyName
Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件和循环判断是否有此学生并显示结果
![按姓名查找学生成绩并显示查找结果](SearchbyName.svg)
#### StatisticAnalysis
Step 1:将数组 t 的全部元素初始化为0
Step 2:利用循环和if条件统计各分数段学生人数
Step 3:利用循环和if条件统计各分数段学生所占比结果
![统计各分数段的学生人数及所占的百分比](StatisticAnalysis.svg)
#### PrintScore
Step 1:利用for循环输出学生的学号和姓名
Step 2:利用二次循环输出每位学生的成绩
Step 3:输出学生的总分数和平均分
![打印学生成绩](PrintScore.svg)
#### WritetoFile
Step 1:读取文件输出学生人数和课程门数
Step 2:利用循环for依次输出学生学号和姓名
Step 3:利用二次循环输出学生成绩
Step 4:输出总成绩和平均分
![输出n个学生的学号姓名以及m门课程的成绩](-WritetoFile.svg)
#### ReadfromFile
Step 1:从文件中读取学生人数和课门数
Step 2:利用循环for输入学生学号和姓名
Step 3:利用二次循环输入学生成绩
Step 4:输入学生总成绩和平均分
![从文件中读取学生的学号,姓名及成绩等信息写入结构体](ReadfromFile.svg)
#### exit
## 代码实现
@ -572,7 +541,7 @@ int main(void)
int n = 0,m = 0;
STU stu[STU_NUM];
printf("Input student number(n<%d):",STU_NUM);
scanf("%d",&n);
scnaf("%d",&n);
printf("Input course number(m<=%d):",COURSE_NUM);
scanf("%d",&m);
while(1)
@ -615,7 +584,7 @@ int main(void)
case 13:ReadfromFile(stu,&n,&m);
break;
case 0: printf("Are you sure you want to exit?(Y/N):");
printf("End of program!");
printf("End of program!);
exit(0);
default:printf("Input error!");
}
@ -628,305 +597,351 @@ int main(void)
```
int Menu(void)
{
set itemSelected
printf "Management for Students' scores\n"
printf "1 Input record\n"
printf "2 Calculate total and average score of every course\n"
printf "3 Calculate total and average score of every student\n"
printf "4 Sort in descending order by score\n"
printf "5 Sort in ascending order by score\n"
printf "6 Sort in ascending order by number\n"
printf "7 Sort in dictionary order by name\n"
printf "8 Search by number\n"
printf "9 Search by name\n"
printf "10 Statistic analysis\n"
printf "11 List record\n"
printf "12 Write to a file\n"
printf "13 Read from a file\n"
printf "0 Exit\n"
printf "Please Input your choice:"
input itemSelected //读入用户输入
return itemSelected
int itemSelected;
printf("Management for Students' scores\n");
printf("1 Input record\n");
printf("2 Calculate total and average score of every course\n");
printf("3 Calculate total and average score of every student\n");
printf("4 Sort in descending order by score\n");
printf("5 Sort in ascending order by score\n");
printf("6 Sort in ascending order by number\n");
printf("7 Sort in dictionary order by name\n");
printf("8 Search by number\n");
printf("9 Search by name\n");
printf("10 Statistic analysis\n");
printf("11 List record\n");
printf("12 Write to a file\n");
printf("13 Read from a file\n");
printf("0 Exit\n");
printf("Please Input your choice:");
scanf("%d",&itemSelected); //读入用户输入
return itemSelected;
}
```
// 函数功能:输入 n 个学生的 m 门课成绩
```
function ReadScore(STU stu[],int n,int m) do
void ReadScore(STU stu[],int n,int m)
{
int i,j;
printf "Input student's ID ,name and score:\n"
for from i=0 to n-1 do //输入n个同学
input stu[i].num,stu[i].name
for form j=0 to m-1 do //输入m门成绩
input stu[i].score[j]
end
end
end
printf("Input student's ID ,name and score:\n");
for(i=0,i<n;i++) //n
{
scanf("%ld%s",&stu[i].num,stu[i].name);
for(j=0;j<m;j++) //m
scanf("%f",&stu[i].score[j]);
}
}
```
//函数功能:计算每个学生各门课程的总分和平均分
```
function AverSumofEveryStudent(STU stu[],int n,int m) do
void AverSumofEveryStudent(STU stu[],int n,int m)
{
int i,j;
for form i=0 to n-1 do
for(i=0;i<n;i++)
{
stu[i].sum = 0; //初始化每个学生总分为0
for from j=0 to m-1 do
for(j=0;j<m;j++)
{
stu[i].sum = stu[i].sum + stu[i].score[j]; //累加分数
end
}
stu[i].aver = m>0 ? stu[i].sum /m : -1;
printf "student %d: sum = %.0f,aver = %.0f\n"
end
end
printf("student %d: sum = %.0f,aver = %.0f\n",i+1,stu[i].sum,stu[i].aver);
}
}
```
//函数功能:计算每门课程的总分和平均分
```
function AverSumofEveryCourse(STU stu[],int n,int m) do
void AverSumofEveryCourse(STU stu[],int n,int m)
{
int i,j;
float sum[COURSE_NUM],aver[COURSE_NUM];
for from j=0 to m-1 do
for(j=0;j<m;j++)
{
sum[j] = 0;
for from i=0 to n-1 do
for(i=0;i<n;i++)
{
sum[j]+= stu[i].score[j]; //计算n个同学每门课程的总分
end
}
aver[j] = sum[j]/i;
printf "course %d: sum = %.0f,aver = %.0f\n"
end
end
printf("course %d: sum = %.0f,aver = %.0f\n",j+1, sum[j], aver[j]);
}
}
```
//函数功能:按选择法将数组 sum 的元素值排序
```
function SortbyScore(STU stu[],int n,int m,int(*compare)(float a,float b)) do
voidSortbyScore(STU stu[],int n,int m,int(*compare)(float a,float b))
{
int i, j, k, t;
for from i=0 to n-2 do
for (i=0; i<n-1; i++)
{
k = i;
for from i+1 to n-1 do
if (*compare)(stu[j].sum, stu[k].sum) set k = j;
end
if k != i
for from t=0 to m-1 do //交换m门课程的成绩
for (j=i+1; j<n; j++)
{
if ((*compare)(stu[j].sum, stu[k].sum)) k = j;
}
if (k != i)
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[k].score[t], &stu[i].score[t]);
end
}
SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分
SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分
SwapLong(&stu[k].num, &stu[i].num); //交换学号
SwapChar(stu[k].name, stu[i].name); //交换姓名
end
end
end
}
}
}
```
//使数据按升序排序
```
function Ascending(float a,float b) do
int Ascending(float a,float b)
{
return a < b; //a<b
end
}
```
//使数据按降序排序
```
function Descending(float a,float b) do
int Descending(float a,float b)
{
return a > b; // 这样比较决定了按降序排序,如果 a>b则交换
end
}
```
//交换两个单精度浮点型数据
```
function SwapFloat(float *x,float *y) do
void SwapFloat(float *x,float *y)
{
float temp;
temp = *x;
*x = *y;
*y = temp;
end
}
```
//交换两个长整型数据
```
function SwapLong(long *x,long *y) do
void SwapLong(long *x,long *y)
{
long temp;
temp = *x;
*x = *y;
*y = temp;
end
}
```
//交换两个字符串
```
function SwapChar(char x[],char y[]) do
void SwapChar(char x[],chary[])
{
char temp[MAX_LEN];
strcpy(temp, x);
strcpy(x, y);
strcpy(y, temp);
end
}
```
//函数功能:按选择法将数组 num 的元素从低到高排序
```
function AsSortbyNum(STU stu[],int n,int m) do
void AsSortbyNum(STU stu[],int n,int m)
{
int i, j, k, t;
for from i=0 to n-2 do
for (i=0; i<n-1; i++)
{
int i, j, k, t;
set k = i;
for from j=i+1 to n-1 do
if stu[j].num < stu[k].num set k = j;
end
if k != i do
for from t=0 to m-1 do //交换m门课程的成绩
k = i;
for (j=i+1; j<n; j++)
{
if (stu[j].num < stu[k].num) k = j;
}
if (k != i)
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[k].score[t], &stu[i].score[t]);
end
}
SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分
SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分
SwapLong(&stu[k].num, &stu[i].num); //交换学号
SwapChar(stu[k].name, stu[i].name); //交换姓名
end
end
end
}
}
}
```
//函数功能:交换法实现字符串按字典顺序排序
```
function SortbyName(STU stu[],int n,int m) do
void SortbyName(STU stu[],int n,int m)
{
int i, j, t;
for from i=0 to n-2 do
for from j = i+1 to n-1 do
if strcmp(stu[j].name, stu[i].name) < 0 do
for from t=0 to m-1 do //交换m门课程的成绩
for (i=0; i<n-1; i++)
{
for (j = i+1; j<n; j++)
{
if (strcmp(stu[j].name, stu[i].name) < 0)
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[i].score[t], &stu[j].score[t]);
end
}
SwapFloat(&stu[i].sum, &stu[j].sum); //交换总分
SwapFloat(&stu[i].aver, &stu[j].aver); //交换平均分
SwapLong(&stu[i].num, &stu[j].num); //交换学号
SwapChar(stu[i].name, stu[j].name); //交换姓名
end
end
end
end
}
}
}
}
```
//函数功能:按学号查找学生成绩并显示查找结果
```
function SearchbyNum(STU stu[],int n,int m) do
void SearchbyNum(STU stu[],int n,int m)
{
long number;
int i,j;
printf"Input the number you want to search:"
input number
forfrom i=0 to n-1 do
if stu[i].num==number do
printf"\n"
for from j=0 to m-1 do
printf "%d\t"
printf "\n"
printf("Input the number you want to search:");
scanf("%ld",&number);
for(i=0;i<n;i++)
if(stu[i].num==number)
{
printf("\n");
for(j=0;j<m;j++)
printf("%d\t",stu[i].score[j]);
printf("\n");
break;
end
if i==n
printf "\nNot found!\n"
end
}
if(i==n)
printf("\nNot found!\n");
}
```
//函数功能:按姓名查找学生成绩并显示查找结果
```
function SearchbyName(STU stu[],int n,int m) do
void SearchbyName(STU stu[],int n,int m)
{
char x[MAX_LEN];
int i,j;
printf "Input the name you want to search:"
input x
for from i=0 to n-1 do
if strcmp(stu[i].name,x)==0 do
printf "%ld\t%s\t",stu[i].num,stu[i].name"
for from j=0 to m-1 do
printf "%.0f\t"
end
printf ".0f\t%.0f\n"
printf("Input the name you want to search:");
scanf("%s", x);
for(i=0;i<n;i++)
{
if(strcmp(stu[i].name,x)==0)
{
printf("%ld\t%s\t",stu[i].num,stu[i].name);
for(j=0;j<m;j++)
{
printf("%.0f\t",stu[i].score[j]);
}
printf(".0f\t%.0f\n",stu[i].sum,stu[i].aver);
return;
end
end
printf "\nNot found!\n"
end
}
}
printf("\nNot found!\n);
}
```
//函数功能:统计各分数段的学生人数及所占的百分比
```
funtion StatisticAnalysis(STU stu[],int n,int m) do
void StatisticAnalysis(STU stu[],int n,int m)
{
int i,j,t[6];
for from j=0 do m-1 do
printf "For course %d:\n"
for(j=0;j<m;j++)
{
printf("For course %d:\n",j+1);
memset(t,0,sizeof(t)); //将数组 t 的全部元素初始化为0
for from i=0 to n-1 do
if stu[i].score[j]>=0&&stu[i].score[j]<60 set t[0]++
else if stu[i].score[j]<70 set t[1]++;
else if stu[i].score[j]<80 set t[2]++;
else if stu[i].score[j]<90 set t[3]++;
else if stu[i].score[j]<100 set t[4]++;
else if stu[i].score[j]==100 set t[5]++;
end
for from i=0 to 4 do
if i==0 printf "<60\t%d\t%.2f%%\n"
else if i==5 printf "%d\t%d\t%.2f%%\n"
else printf "%d-%d\t%d\t%.2f%%\n"
end
end
end
for(i=0;i<n;i++)
{
if(stu[i].score[j]>=0&&stu[i].score[j]<60) t[0]++;
else if(stu[i].score[j]<70) t[1]++;
else if(stu[i].score[j]<80) t[2]++;
else if(stu[i].score[j]<90) t[3]++;
else if(stu[i].score[j]<100) t[4]++;
else if(stu[i].score[j]==100) t[5]++;
}
for(i=0;i<=5;i++)
{
if(i==0) printf("<60\t%d\t%.2f%%\n",t[i],(float)t[i]/n*100);
else if(i==5) printf("%d\t%d\t%.2f%%\n",(i+5)*10,t[i],(float)t[i]/n*100);
else printf("%d-%d\t%d\t%.2f%%\n",(i+5)*10,(i+5)*10+9,t[i],(float)t[i]/n*100);
}
}
}
```
//函数功能:打印学生成绩
```
function PrintScore(STU stu[],int n,int m) do
void PrintScore(STU stu[],int n,int m)
{
int i,j;
for from i=0 to n-1 do
printf "%ld\t%s\t"
for from j=0 to m-1 do
printf "%.0f\t"
end
printf "%.0f\t%.0f\n"
end
end
for (i=0; i<n; i++)
{
printf("%ld\t%s\t", stu[i].num, stu[i].name);
for (j=0; j<m; j++)
{
printf("%.0f\t", stu[i].score[j]);
}
printf("%.0f\t%.0f\n", stu[i].sum, stu[i].aver);
}
}
```
//输出 n 个学生的学号、姓名及 m 门课程的成绩到文件 student.txt 中
```
function WritetoFile(STU stu[],int n,int m) do
void WritetoFile(STU stu[],int n,int m)
{
FILE *fp;
int i, j;
if fp = fopen("student.txt","w") == NULL do
printf "Failure to open score.txt!\n"
if((fp = fopen("student.txt","w")) == NULL)
{
printf("Failure to open score.txt!\n");
exit(0);
end
}
fprintf(fp, "%d\t%d\n", n, m); //将学生人数和课程门数写入文件
for from i=0 to n-1 do
for (i=0; i<n; i++)
{
fprintf(fp, "%10ld%10s", stu[i].num, stu[i].name);
for from j=0 to m-1 do
for (j=0; j<m; j++)
{
fprintf(fp, "%10.0f", stu[i].score[j]);
end
}
fprintf(fp, "%10.0f%10.0f\n", stu[i].sum, stu[i].aver);
end
}
fclose(fp);
end
}
```
//从文件中读取学生的学号、姓名及成绩等信息写入到结构体 stu 中
```
function ReadfromFile(STU stu[],int *n,int *m) do
void ReadfromFile(STU stu[],int *n,int *m)
{
FILE *fp;
int i, j;
if fp = fopen("student.txt","r") == NULL do
printf "Failure to open score.txt!\n"
if ((fp = fopen("student.txt","r")) == NULL)
{
printf("Failure to open score.txt!\n");
exit(0);
end
}
fscanf(fp, "%d\t%d", n, m); //从文件中读出学生人数,课程门数
for from i=0 to *n-1 do //学生人数保存在n指向的储存单元
for (i=0; i<*n; i++) //学生人数保存在n指向的储存单元
{
fscanf(fp, "%10ld", &stu[i].num);
fscanf(fp, "%10s", stu[i].name);
for form j=0 to *m-1 do //课程门数保存在m指向的储存单元
for (j=0; j<*m; j++) //课程门数保存在m指向的储存单元
{
fscanf(fp, "%10f", &stu[i].score[j]); //不能用%10.0f
end
}
fscanf(fp, "%10f%10f", &stu[i].sum, &stu[i].aver); //不能用%10.0f
end
}
fclose(fp);
end
}
```

@ -1,157 +0,0 @@
<?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="2821" height="3968">
<rect x="0" y="0" width="2821" height="3968" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,248 837,323"/>
<polygon fill="#404040" stroke="none" points="837,341 854,310 819,310"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,2201 837,3702"/>
<polygon fill="#404040" stroke="none" points="837,3720 854,3689 819,3689"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 651,124 A 62 62, 0, 0 0, 651 248 L 1023,248 A 62 62, 0, 0 0, 1023 124 Z"/>
<text x="837" y="142" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">ReadfromFile</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 713,3720 A 62 62, 0, 0 0, 713 3844 L 961,3844 A 62 62, 0, 0 0, 961 3720 Z"/>
<text x="837" y="3738" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,496 837,571"/>
<polygon fill="#404040" stroke="none" points="837,589 854,558 819,558"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,744 837,819"/>
<polygon fill="#404040" stroke="none" points="837,837 854,806 819,806"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,1736 837,1811"/>
<polygon fill="#404040" stroke="none" points="837,1829 854,1798 819,1798"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,1953 837,2059"/>
<polygon fill="#404040" stroke="none" points="837,2077 854,2046 819,2046"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 651,341 L 651,496 L 1023,496 L 1023,341 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="651,372 1023,372"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="682,341 682,496"/>
<text x="852" y="390" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="852" dy="62" unicode-bidi="embed">Integer i</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 651,589 L 651,744 L 1023,744 L 1023,589 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="651,620 1023,620"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="682,589 682,744"/>
<text x="852" y="638" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="852" dy="62" unicode-bidi="embed">Integer j</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1271,1085 1488,1085 1488,1377"/>
<polygon fill="#404040" stroke="none" points="1488,1395 1505,1364 1470,1364"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1488,1581 1488,1705 885,1705"/>
<polygon fill="#404040" stroke="none" points="868,1705 898,1722 898,1687"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="403,1085 155,1085 155,1705 788,1705"/>
<polygon fill="#404040" stroke="none" points="806,1705 775,1687 775,1722"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 837,837 L 372,1085 L 837,1333 L 1302,1085 Z"/>
<text x="837" y="1010" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">(fp = fopen(&quot;student.txt&quot;,</tspan>
<tspan x="837" dy="62" unicode-bidi="embed"> &quot;r&quot;)) == NULL</tspan>
</text>
</g>
<g>
<path fill="#D0FFD0" stroke="#70A070" stroke-width="4" stroke-dasharray="none" d="M 1178,1395 L 1085,1581 L 1798,1581 L 1891,1395 Z"/>
<text x="1488" y="1413" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1488" dy="62" unicode-bidi="embed">Output &quot;Failure to open</tspan>
<tspan x="1488" dy="62" unicode-bidi="embed"> score.txt!\n&quot;</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="837" cy="1705" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="1395" y="979" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1395" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="263" y="979" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="263" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 496,1829 L 434,1953 L 1178,1953 L 1240,1829 Z"/>
<text x="837" y="1847" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">Input fp, &quot;%d\t%d&quot;, n, m</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,2139 1519,2139 1519,2245"/>
<polygon fill="#404040" stroke="none" points="1519,2263 1536,2232 1501,2232"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,3503 1519,3596 899,3596 899,2218"/>
<polygon fill="#404040" stroke="none" points="899,2201 881,2231 916,2231"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,2387 1519,2462"/>
<polygon fill="#404040" stroke="none" points="1519,2480 1536,2449 1501,2449"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,2604 1519,2710"/>
<polygon fill="#404040" stroke="none" points="1519,2728 1536,2697 1501,2697"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,2852 1519,3299"/>
<polygon fill="#404040" stroke="none" points="1519,3317 1536,3286 1501,3286"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1116,2263 L 1054,2387 L 1922,2387 L 1984,2263 Z"/>
<text x="1519" y="2281" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">Input fp, &quot;%10ld&quot;, &amp;stu[i].num</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1147,2480 L 1085,2604 L 1891,2604 L 1953,2480 Z"/>
<text x="1519" y="2498" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">Input fp, &quot;%10s&quot;, stu[i].name</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1767,2790 2201,2790 2201,2896"/>
<polygon fill="#404040" stroke="none" points="2201,2914 2218,2883 2183,2883"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2201,3100 2201,3193 1581,3193 1581,2869"/>
<polygon fill="#404040" stroke="none" points="1581,2852 1563,2882 1598,2882"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1798,2914 L 1705,3100 L 2604,3100 L 2697,2914 Z"/>
<text x="2201" y="2932" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2201" dy="62" unicode-bidi="embed">Input fp, &quot;%10f&quot;, &amp;stu[i].score</tspan>
<tspan x="2201" dy="62" unicode-bidi="embed">[j]</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 1333,2728 L 1271,2790 L 1333,2852 L 1705,2852 L 1767,2790 L 1705,2728 Z"/>
<text x="1519" y="2746" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">j = 0 to m-1</tspan>
</text>
</g>
<text x="1860" y="2684" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1860" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="1410" y="2870" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1410" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1116,3317 L 1023,3503 L 1922,3503 L 2015,3317 Z"/>
<text x="1519" y="3335" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">Input fp, &quot;%10f%10f&quot;, &amp;stu[i].</tspan>
<tspan x="1519" dy="62" unicode-bidi="embed">sum, &amp;stu[i].aver</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 651,2077 L 589,2139 L 651,2201 L 1023,2201 L 1085,2139 L 1023,2077 Z"/>
<text x="837" y="2095" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">i = 0 to n-1</tspan>
</text>
</g>
<text x="1178" y="2033" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="728" y="2219" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="728" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 10 KiB

@ -1,189 +0,0 @@
<?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="3472" height="4464">
<rect x="0" y="0" width="3472" height="4464" 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,1240 372,4198"/>
<polygon fill="#404040" stroke="none" points="372,4216 389,4185 354,4185"/>
<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">SortbyName</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 248,4216 A 62 62, 0, 0 0, 248 4340 L 496,4340 A 62 62, 0, 0 0, 496 4216 Z"/>
<text x="372" y="4234" 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,819"/>
<polygon fill="#404040" stroke="none" points="372,837 389,806 354,806"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,992 372,1098"/>
<polygon fill="#404040" stroke="none" points="372,1116 389,1085 354,1085"/>
<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>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 186,837 L 186,992 L 558,992 L 558,837 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="186,868 558,868"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="217,837 217,992"/>
<text x="387" y="886" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="387" dy="62" unicode-bidi="embed">Integer t</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="620,1178 806,1178 806,1315"/>
<polygon fill="#404040" stroke="none" points="806,1333 823,1302 788,1302"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="806,1457 806,4092 434,4092 434,1257"/>
<polygon fill="#404040" stroke="none" points="434,1240 416,1270 451,1270"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1054,1395 1705,1395 1705,1501"/>
<polygon fill="#404040" stroke="none" points="1705,1519 1722,1488 1687,1488"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1705,3875 1705,3968 868,3968 868,1474"/>
<polygon fill="#404040" stroke="none" points="868,1457 850,1487 885,1487"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2139,1767 2356,1767 2356,2090"/>
<polygon fill="#404040" stroke="none" points="2356,2108 2373,2077 2338,2077"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2356,3720 2356,3844 1753,3844"/>
<polygon fill="#404040" stroke="none" points="1736,3844 1766,3861 1766,3826"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1271,1767 1023,1767 1023,3844 1656,3844"/>
<polygon fill="#404040" stroke="none" points="1674,3844 1643,3826 1643,3861"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1705,1519 L 1240,1767 L 1705,2015 L 2170,1767 Z"/>
<text x="1705" y="1692" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1705" dy="62" unicode-bidi="embed">strcmp(stu[j].name, stu[i].</tspan>
<tspan x="1705" dy="62" unicode-bidi="embed">name) &lt; 0</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2356,2232 2356,2679"/>
<polygon fill="#404040" stroke="none" points="2356,2697 2373,2666 2338,2666"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2356,2883 2356,2958"/>
<polygon fill="#404040" stroke="none" points="2356,2976 2373,2945 2338,2945"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2356,3162 2356,3237"/>
<polygon fill="#404040" stroke="none" points="2356,3255 2373,3224 2338,3224"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2356,3441 2356,3516"/>
<polygon fill="#404040" stroke="none" points="2356,3534 2373,3503 2338,3503"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2604,2170 2945,2170 2945,2276"/>
<polygon fill="#404040" stroke="none" points="2945,2294 2962,2263 2927,2263"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2945,2480 2945,2573 2418,2573 2418,2249"/>
<polygon fill="#404040" stroke="none" points="2418,2232 2400,2262 2435,2262"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2542,2294 L 2542,2480 L 3348,2480 L 3348,2294 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2573,2294 2573,2480"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="3317,2294 3317,2480"/>
<text x="2945" y="2312" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2945" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[i].score[t], &amp;</tspan>
<tspan x="2945" dy="62" unicode-bidi="embed">stu[j].score[t])</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 2170,2108 L 2108,2170 L 2170,2232 L 2542,2232 L 2604,2170 L 2542,2108 Z"/>
<text x="2356" y="2126" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2356" dy="62" unicode-bidi="embed">t = 0 to m-1</tspan>
</text>
</g>
<text x="2697" y="2064" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2697" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="2247" y="2250" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2247" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1922,2697 L 1922,2883 L 2790,2883 L 2790,2697 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,2697 1953,2883"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2759,2697 2759,2883"/>
<text x="2356" y="2715" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2356" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[i].sum, &amp;stu[j].</tspan>
<tspan x="2356" dy="62" unicode-bidi="embed">sum)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1922,2976 L 1922,3162 L 2790,3162 L 2790,2976 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,2976 1953,3162"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2759,2976 2759,3162"/>
<text x="2356" y="2994" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2356" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[i].aver, &amp;stu[j].</tspan>
<tspan x="2356" dy="62" unicode-bidi="embed">aver)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1922,3255 L 1922,3441 L 2790,3441 L 2790,3255 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,3255 1953,3441"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2759,3255 2759,3441"/>
<text x="2356" y="3273" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2356" dy="62" unicode-bidi="embed">SwapLong(&amp;stu[i].num, &amp;stu[j].</tspan>
<tspan x="2356" dy="62" unicode-bidi="embed">num)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1953,3534 L 1953,3720 L 2759,3720 L 2759,3534 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1984,3534 1984,3720"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2728,3534 2728,3720"/>
<text x="2356" y="3552" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2356" dy="62" unicode-bidi="embed">SwapChar(stu[i].name, stu</tspan>
<tspan x="2356" dy="62" unicode-bidi="embed">[j].name)</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="1705" cy="3844" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2263" y="1661" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2263" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1131" y="1661" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1131" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 620,1333 L 558,1395 L 620,1457 L 992,1457 L 1054,1395 L 992,1333 Z"/>
<text x="806" y="1351" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="806" dy="62" unicode-bidi="embed">j = i+1 to n-1</tspan>
</text>
</g>
<text x="1147" y="1289" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1147" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="697" y="1475" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="697" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 186,1116 L 124,1178 L 186,1240 L 558,1240 L 620,1178 L 558,1116 Z"/>
<text x="372" y="1134" 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-2</tspan>
</text>
</g>
<text x="713" y="1072" 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="1258" 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>

Before

Width:  |  Height:  |  Size: 13 KiB

@ -1,385 +0,0 @@
<?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="4309" height="8711">
<rect x="0" y="0" width="4309" height="8711" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,310 496,385"/>
<polygon fill="#404040" stroke="none" points="496,403 513,372 478,372"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,1302 496,8445"/>
<polygon fill="#404040" stroke="none" points="496,8463 513,8432 478,8432"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 217,124 A 93 93, 0, 0 0, 217 310 L 775,310 A 93 93, 0, 0 0, 775 124 Z"/>
<text x="496" y="142" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="496" dy="62" unicode-bidi="embed">StatisticAnalysis</tspan>
<tspan x="496" dy="62" unicode-bidi="embed">(Integer n, Integer m)</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 372,8463 A 62 62, 0, 0 0, 372 8587 L 620,8587 A 62 62, 0, 0 0, 620 8463 Z"/>
<text x="496" y="8481" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="496" dy="62" unicode-bidi="embed">End</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,558 496,633"/>
<polygon fill="#404040" stroke="none" points="496,651 513,620 478,620"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,806 496,881"/>
<polygon fill="#404040" stroke="none" points="496,899 513,868 478,868"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,1054 496,1160"/>
<polygon fill="#404040" stroke="none" points="496,1178 513,1147 478,1147"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 310,403 L 310,558 L 682,558 L 682,403 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="310,434 682,434"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="341,403 341,558"/>
<text x="511" y="452" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="511" dy="62" unicode-bidi="embed">Integer i</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 310,651 L 310,806 L 682,806 L 682,651 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="310,682 682,682"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="341,651 341,806"/>
<text x="511" y="700" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="511" dy="62" unicode-bidi="embed">Integer j</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 310,899 L 310,1054 L 682,1054 L 682,899 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="310,930 682,930"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="341,899 341,1054"/>
<text x="511" y="948" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="511" dy="62" unicode-bidi="embed">Integer t[6]</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="744,1240 1085,1240 1085,1346"/>
<polygon fill="#404040" stroke="none" points="1085,1364 1102,1333 1067,1333"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,7068 1085,8339 558,8339 558,1319"/>
<polygon fill="#404040" stroke="none" points="558,1302 540,1332 575,1332"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,1488 1085,1563"/>
<polygon fill="#404040" stroke="none" points="1085,1581 1102,1550 1067,1550"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,1705 1085,1811"/>
<polygon fill="#404040" stroke="none" points="1085,1829 1102,1798 1067,1798"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1085,1953 1085,6926"/>
<polygon fill="#404040" stroke="none" points="1085,6944 1102,6913 1067,6913"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 744,1364 L 682,1488 L 1426,1488 L 1488,1364 Z"/>
<text x="1085" y="1382" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1085" dy="62" unicode-bidi="embed">Output For course %d:\n</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 744,1581 L 744,1705 L 1426,1705 L 1426,1581 Z"/>
<polyline fill="none" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" points="775,1581 775,1705"/>
<polyline fill="none" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" points="1395,1581 1395,1705"/>
<text x="1085" y="1599" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1085" dy="62" unicode-bidi="embed">memset(t, 0, sizeof(t))</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1333,1891 2015,1891 2015,1997"/>
<polygon fill="#404040" stroke="none" points="2015,2015 2032,1984 1997,1984"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,6696 2015,6789 1147,6789 1147,1970"/>
<polygon fill="#404040" stroke="none" points="1147,1953 1129,1983 1164,1983"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,2852 2015,2927"/>
<polygon fill="#404040" stroke="none" points="2015,2945 2032,2914 1997,2914"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,3596 2015,3671"/>
<polygon fill="#404040" stroke="none" points="2015,3689 2032,3658 1997,3658"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,4340 2015,4415"/>
<polygon fill="#404040" stroke="none" points="2015,4433 2032,4402 1997,4402"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,5084 2015,5159"/>
<polygon fill="#404040" stroke="none" points="2015,5177 2032,5146 1997,5146"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2015,5890 2015,5965"/>
<polygon fill="#404040" stroke="none" points="2015,5983 2032,5952 1997,5952"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2480,2263 2697,2263 2697,2555"/>
<polygon fill="#404040" stroke="none" points="2697,2573 2714,2542 2679,2542"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2697,2697 2697,2821 2063,2821"/>
<polygon fill="#404040" stroke="none" points="2046,2821 2076,2838 2076,2803"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1550,2263 1302,2263 1302,2821 1966,2821"/>
<polygon fill="#404040" stroke="none" points="1984,2821 1953,2803 1953,2838"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,2015 L 1519,2263 L 2015,2511 L 2511,2263 Z"/>
<text x="2015" y="2188" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] &gt;= 0 &amp;&amp; stu[i].</tspan>
<tspan x="2015" dy="62" unicode-bidi="embed">score[j] &lt; 60</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2511,2573 L 2511,2697 L 2883,2697 L 2883,2573 Z"/>
<text x="2697" y="2591" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2697" dy="62" unicode-bidi="embed">t[0] = t[0]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="2821" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2604" y="2157" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2604" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1410" y="2157" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1410" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2294,3100 2511,3100 2511,3299"/>
<polygon fill="#404040" stroke="none" points="2511,3317 2528,3286 2493,3286"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2511,3441 2511,3565 2063,3565"/>
<polygon fill="#404040" stroke="none" points="2046,3565 2076,3582 2076,3547"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1736,3100 1488,3100 1488,3565 1966,3565"/>
<polygon fill="#404040" stroke="none" points="1984,3565 1953,3547 1953,3582"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,2945 L 1705,3100 L 2015,3255 L 2325,3100 Z"/>
<text x="2015" y="3056" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] &lt; 70</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2325,3317 L 2325,3441 L 2697,3441 L 2697,3317 Z"/>
<text x="2511" y="3335" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2511" dy="62" unicode-bidi="embed">t[1] = t[1]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="3565" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2418" y="2994" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2418" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1596" y="2994" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1596" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2294,3844 2511,3844 2511,4043"/>
<polygon fill="#404040" stroke="none" points="2511,4061 2528,4030 2493,4030"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2511,4185 2511,4309 2063,4309"/>
<polygon fill="#404040" stroke="none" points="2046,4309 2076,4326 2076,4291"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1736,3844 1488,3844 1488,4309 1966,4309"/>
<polygon fill="#404040" stroke="none" points="1984,4309 1953,4291 1953,4326"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,3689 L 1705,3844 L 2015,3999 L 2325,3844 Z"/>
<text x="2015" y="3800" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] &lt; 80</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2325,4061 L 2325,4185 L 2697,4185 L 2697,4061 Z"/>
<text x="2511" y="4079" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2511" dy="62" unicode-bidi="embed">t[2] = t[2]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="4309" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2418" y="3738" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2418" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1596" y="3738" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1596" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2294,4588 2511,4588 2511,4787"/>
<polygon fill="#404040" stroke="none" points="2511,4805 2528,4774 2493,4774"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2511,4929 2511,5053 2063,5053"/>
<polygon fill="#404040" stroke="none" points="2046,5053 2076,5070 2076,5035"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1736,4588 1488,4588 1488,5053 1966,5053"/>
<polygon fill="#404040" stroke="none" points="1984,5053 1953,5035 1953,5070"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,4433 L 1705,4588 L 2015,4743 L 2325,4588 Z"/>
<text x="2015" y="4544" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] &lt; 90</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2325,4805 L 2325,4929 L 2697,4929 L 2697,4805 Z"/>
<text x="2511" y="4823" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2511" dy="62" unicode-bidi="embed">t[3] = t[3]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="5053" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2418" y="4482" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2418" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1596" y="4482" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1596" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2325,5363 2542,5363 2542,5593"/>
<polygon fill="#404040" stroke="none" points="2542,5611 2559,5580 2524,5580"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2542,5735 2542,5859 2063,5859"/>
<polygon fill="#404040" stroke="none" points="2046,5859 2076,5876 2076,5841"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1705,5363 1457,5363 1457,5859 1966,5859"/>
<polygon fill="#404040" stroke="none" points="1984,5859 1953,5841 1953,5876"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,5177 L 1674,5363 L 2015,5549 L 2356,5363 Z"/>
<text x="2015" y="5319" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] &lt; 100</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2356,5611 L 2356,5735 L 2728,5735 L 2728,5611 Z"/>
<text x="2542" y="5629" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2542" dy="62" unicode-bidi="embed">t[4] = t[4]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="5859" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2449" y="5257" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2449" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1565" y="5257" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1565" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2325,6169 2542,6169 2542,6399"/>
<polygon fill="#404040" stroke="none" points="2542,6417 2559,6386 2524,6386"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2542,6541 2542,6665 2063,6665"/>
<polygon fill="#404040" stroke="none" points="2046,6665 2076,6682 2076,6647"/>
<polyline fill="none" stroke="#FF8040" stroke-width="8" stroke-dasharray="none" points="1705,6169 1457,6169 1457,6665 1966,6665"/>
<polygon fill="#FF8040" stroke="none" points="1984,6665 1953,6647 1953,6682"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2015,5983 L 1674,6169 L 2015,6355 L 2356,6169 Z"/>
<text x="2015" y="6125" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2015" dy="62" unicode-bidi="embed">stu[i].score[j] == 100</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2356,6417 L 2356,6541 L 2728,6541 L 2728,6417 Z"/>
<text x="2542" y="6435" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2542" dy="62" unicode-bidi="embed">t[5] = t[5]+1</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="2015" cy="6665" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2449" y="6063" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2449" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1565" y="6063" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1565" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 899,1829 L 837,1891 L 899,1953 L 1271,1953 L 1333,1891 L 1271,1829 Z"/>
<text x="1085" y="1847" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1085" dy="62" unicode-bidi="embed">i = 0 to n-1</tspan>
</text>
</g>
<text x="1426" y="1785" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1426" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="976" y="1971" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="976" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1302,7006 3255,7006 3255,7112"/>
<polygon fill="#404040" stroke="none" points="3255,7130 3272,7099 3237,7099"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="3255,8122 3255,8215 1147,8215 1147,7085"/>
<polygon fill="#404040" stroke="none" points="1147,7068 1129,7098 1164,7098"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="3410,7223 3751,7223 3751,7360"/>
<polygon fill="#404040" stroke="none" points="3751,7378 3768,7347 3733,7347"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="3751,7502 3751,8091 3303,8091"/>
<polygon fill="#404040" stroke="none" points="3286,8091 3316,8108 3316,8073"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="3100,7223 2263,7223 2263,7360"/>
<polygon fill="#404040" stroke="none" points="2263,7378 2280,7347 2245,7347"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2263,7967 2263,8091 3206,8091"/>
<polygon fill="#404040" stroke="none" points="3224,8091 3193,8073 3193,8108"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 3255,7130 L 3069,7223 L 3255,7316 L 3441,7223 Z"/>
<text x="3255" y="7179" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3255" dy="62" unicode-bidi="embed">i == 0</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 3379,7378 L 3317,7502 L 4123,7502 L 4185,7378 Z"/>
<text x="3751" y="7396" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3751" dy="62" unicode-bidi="embed">Output &lt;60\t%d\t%.2f%%\n</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2418,7471 2759,7471 2759,7608"/>
<polygon fill="#404040" stroke="none" points="2759,7626 2776,7595 2741,7595"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2759,7750 2759,7936 2311,7936"/>
<polygon fill="#404040" stroke="none" points="2294,7936 2324,7953 2324,7918"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2108,7471 1767,7471 1767,7608"/>
<polygon fill="#404040" stroke="none" points="1767,7626 1784,7595 1749,7595"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1767,7812 1767,7936 2214,7936"/>
<polygon fill="#404040" stroke="none" points="2232,7936 2201,7918 2201,7953"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 2263,7378 L 2077,7471 L 2263,7564 L 2449,7471 Z"/>
<text x="2263" y="7427" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2263" dy="62" unicode-bidi="embed">i==5</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 2387,7626 L 2325,7750 L 3131,7750 L 3193,7626 Z"/>
<text x="2759" y="7644" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2759" dy="62" unicode-bidi="embed">Output %d\t%d\t%.2f%%\n</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1426,7626 L 1333,7812 L 2108,7812 L 2201,7626 Z"/>
<text x="1767" y="7644" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1767" dy="62" unicode-bidi="embed">Output %d-%d\t%d\t%.2f</tspan>
<tspan x="1767" dy="62" unicode-bidi="embed">%%\n</tspan>
</text>
</g>
<ellipse cx="2263" cy="7936" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="2542" y="7365" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2542" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1968" y="7365" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1968" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<ellipse cx="3255" cy="8091" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="3534" y="7117" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="3534" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="2960" y="7117" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2960" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 930,6944 L 868,7006 L 930,7068 L 1240,7068 L 1302,7006 L 1240,6944 Z"/>
<text x="1085" y="6962" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1085" dy="62" unicode-bidi="embed">i = 0 to 5</tspan>
</text>
</g>
<text x="1395" y="6900" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1395" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="976" y="7086" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="976" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 310,1178 L 248,1240 L 310,1302 L 682,1302 L 744,1240 L 682,1178 Z"/>
<text x="496" y="1196" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="496" dy="62" unicode-bidi="embed">j = 0 to m-1</tspan>
</text>
</g>
<text x="837" y="1134" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="837" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="387" y="1320" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="387" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 26 KiB

Loading…
Cancel
Save