Compare commits

...

27 Commits

Author SHA1 Message Date
pvfj5ugro a037933dfe Merge pull request 'XZG——伪代码2' (#35) from XZG——伪代码2 into master
2 years ago
xuzigui 6b02178f28 XZG_伪代码2
2 years ago
xuzigui 5b3b6a12a1 XZG_伪代码
2 years ago
pvfj5ugro dcba628f21 Merge pull request 'XZG_伪代码' (#34) from XZG_伪代码 into master
2 years ago
xuzigui 3fb95cd525 XZG_伪代码
2 years ago
Cx330 89f4dfff59 伪代码
2 years ago
Cx330 6d5711b197 Cx330_修
2 years ago
Cx330 3cb5288b72
2 years ago
Cx330 70006b0af7
2 years ago
Cx330 555ab8f73e Merge remote-tracking branch 'origin/XZG_SortbyName流程图'
2 years ago
Cx330 7284cd53ed
2 years ago
pvfj5ugro 3b5537c19e Merge pull request 'XZG_SortbyScore流程图' (#32) from xzg_SortbyScore流程图 into master
2 years ago
xuzigui fdefd720c6 XZG_SortbyScore流程图
2 years ago
xuzigui 3d2ab7022f XZG_SortbyName流程图
2 years ago
Cx330 351946e812 Merge remote-tracking branch 'origin/ZY-ReadfromFile'
2 years ago
Cx330 90d4e390b0 Merge remote-tracking branch 'origin/XZG_AverSumofEveryCourse流程图'
2 years ago
xuzigui ed2925711d XZG_AverSumofEveryCourse流程图
2 years ago
zhangyu be7204dee6 ZY-ReadfromFile
2 years ago
Cx330 f495854818 整合
2 years ago
Cx330 df05ceafe7 Merge branch 'XZL_StatisticAnalysis'
2 years ago
Cx330 230a25dc2c 找bug
2 years ago
pvfj5ugro bca412db24 Merge pull request 'ZY-WritetoFile' (#26) from ZY-WritetoFile into master
2 years ago
pvfj5ugro 1bcd4f8f5d Merge pull request 'XZG_AsScortbyNum流程图' (#23) from XZG_AsScortbyNum流程图 into master
2 years ago
zhangyu 3f5fdb39a4 ZY-ReadfromFile
2 years ago
zhangyu 70cbd02ddb ZY-WritetoFile
2 years ago
xuzilin cf25fa56c9 XZL_StatisticAnalysis
2 years ago
xuzigui fa5c4d5347 XZG_AsScotbyNum流程图
2 years ago

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

After

Width:  |  Height:  |  Size: 9.8 KiB

@ -0,0 +1,239 @@
<?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="2728" height="5487">
<rect x="0" y="0" width="2728" height="5487" 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,1488 372,5221"/>
<polygon fill="#404040" stroke="none" points="372,5239 389,5208 354,5208"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 186,124 A 62 62, 0, 0 0, 186 248 L 558,248 A 62 62, 0, 0 0, 558 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">AsSortbyNum</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 248,5239 A 62 62, 0, 0 0, 248 5363 L 496,5363 A 62 62, 0, 0 0, 496 5239 Z"/>
<text x="372" y="5257" 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,1067"/>
<polygon fill="#404040" stroke="none" points="372,1085 389,1054 354,1054"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="372,1240 372,1346"/>
<polygon fill="#404040" stroke="none" points="372,1364 389,1333 354,1333"/>
<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 k</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 186,1085 L 186,1240 L 558,1240 L 558,1085 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="186,1116 558,1116"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="217,1085 217,1240"/>
<text x="387" y="1134" 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,1426 992,1426 992,1532"/>
<polygon fill="#404040" stroke="none" points="992,1550 1009,1519 974,1519"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="992,5022 992,5115 434,5115 434,1505"/>
<polygon fill="#404040" stroke="none" points="434,1488 416,1518 451,1518"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="992,1674 992,1780"/>
<polygon fill="#404040" stroke="none" points="992,1798 1009,1767 974,1767"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="992,1922 992,2958"/>
<polygon fill="#404040" stroke="none" points="992,2976 1009,2945 974,2945"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 806,1550 L 806,1674 L 1178,1674 L 1178,1550 Z"/>
<text x="992" y="1568" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="992" dy="62" unicode-bidi="embed">k = i</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1240,1860 1829,1860 1829,1966"/>
<polygon fill="#404040" stroke="none" points="1829,1984 1846,1953 1811,1953"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1829,2759 1829,2852 1054,2852 1054,1939"/>
<polygon fill="#404040" stroke="none" points="1054,1922 1036,1952 1071,1952"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2201,2201 2418,2201 2418,2462"/>
<polygon fill="#404040" stroke="none" points="2418,2480 2435,2449 2400,2449"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2418,2604 2418,2728 1877,2728"/>
<polygon fill="#404040" stroke="none" points="1860,2728 1890,2745 1890,2710"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1457,2201 1209,2201 1209,2728 1780,2728"/>
<polygon fill="#404040" stroke="none" points="1798,2728 1767,2710 1767,2745"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1829,1984 L 1426,2201 L 1829,2418 L 2232,2201 Z"/>
<text x="1829" y="2157" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1829" dy="62" unicode-bidi="embed">if (stu[j].num &lt; stu[k].num)</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2232,2480 L 2232,2604 L 2604,2604 L 2604,2480 Z"/>
<text x="2418" y="2498" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2418" dy="62" unicode-bidi="embed">k = j</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="1829" cy="2728" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2325" y="2095" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2325" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1317" y="2095" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1317" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 806,1798 L 744,1860 L 806,1922 L 1178,1922 L 1240,1860 L 1178,1798 Z"/>
<text x="992" y="1816" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="992" dy="62" unicode-bidi="embed">j = i+1 to n-1</tspan>
</text>
</g>
<text x="1333" y="1754" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1333" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="883" y="1940" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="883" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1147,3069 1519,3069 1519,3237"/>
<polygon fill="#404040" stroke="none" points="1519,3255 1536,3224 1501,3224"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4867 1519,4991 1040,4991"/>
<polygon fill="#404040" stroke="none" points="1023,4991 1053,5008 1053,4973"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,3069 589,3069 589,4991 943,4991"/>
<polygon fill="#404040" stroke="none" points="961,4991 930,4973 930,5008"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 992,2976 L 806,3069 L 992,3162 L 1178,3069 Z"/>
<text x="992" y="3025" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="992" dy="62" unicode-bidi="embed">k != i</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,3379 1519,3826"/>
<polygon fill="#404040" stroke="none" points="1519,3844 1536,3813 1501,3813"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4030 1519,4105"/>
<polygon fill="#404040" stroke="none" points="1519,4123 1536,4092 1501,4092"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4309 1519,4384"/>
<polygon fill="#404040" stroke="none" points="1519,4402 1536,4371 1501,4371"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4588 1519,4663"/>
<polygon fill="#404040" stroke="none" points="1519,4681 1536,4650 1501,4650"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1767,3317 2139,3317 2139,3423"/>
<polygon fill="#404040" stroke="none" points="2139,3441 2156,3410 2121,3410"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2139,3627 2139,3720 1581,3720 1581,3396"/>
<polygon fill="#404040" stroke="none" points="1581,3379 1563,3409 1598,3409"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1705,3441 L 1705,3627 L 2573,3627 L 2573,3441 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1736,3441 1736,3627"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2542,3441 2542,3627"/>
<text x="2139" y="3459" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2139" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[k].score[t], &amp;</tspan>
<tspan x="2139" dy="62" unicode-bidi="embed">stu[i].score[t])</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 1333,3255 L 1271,3317 L 1333,3379 L 1705,3379 L 1767,3317 L 1705,3255 Z"/>
<text x="1519" y="3273" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">t = 0 to m-1</tspan>
</text>
</g>
<text x="1860" y="3211" 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="3397" 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 1054,3844 L 1054,4030 L 1984,4030 L 1984,3844 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,3844 1085,4030"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,3844 1953,4030"/>
<text x="1519" y="3862" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[k].sum, &amp;stu[i].</tspan>
<tspan x="1519" dy="62" unicode-bidi="embed">sum)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1054,4123 L 1054,4309 L 1984,4309 L 1984,4123 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,4123 1085,4309"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,4123 1953,4309"/>
<text x="1519" y="4141" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">SwapFloat(&amp;stu[k].aver, &amp;stu[i].</tspan>
<tspan x="1519" dy="62" unicode-bidi="embed">aver)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1054,4402 L 1054,4588 L 1984,4588 L 1984,4402 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,4402 1085,4588"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,4402 1953,4588"/>
<text x="1519" y="4420" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">SwapLong(&amp;stu[k].num, &amp;stu[i].</tspan>
<tspan x="1519" dy="62" unicode-bidi="embed">num)</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1116,4681 L 1116,4867 L 1922,4867 L 1922,4681 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1147,4681 1147,4867"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1891,4681 1891,4867"/>
<text x="1519" y="4699" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">SwapChar(stu[k].name, stu</tspan>
<tspan x="1519" dy="62" unicode-bidi="embed">[i].name)</tspan>
</text>
</g>
</g>
<g>
</g>
<ellipse cx="992" cy="4991" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="1271" y="2963" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1271" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="697" y="2963" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="697" dy="62" unicode-bidi="embed">False</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 186,1364 L 124,1426 L 186,1488 L 558,1488 L 620,1426 L 558,1364 Z"/>
<text x="372" y="1382" 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="1320" 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="1506" 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: 16 KiB

@ -0,0 +1,137 @@
<?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="2232" height="3317">
<rect x="0" y="0" width="2232" height="3317" fill="#FFFFFF"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,248 496,323"/>
<polygon fill="#404040" stroke="none" points="496,341 513,310 478,310"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,1488 496,3051"/>
<polygon fill="#404040" stroke="none" points="496,3069 513,3038 478,3038"/>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 186,124 A 62 62, 0, 0 0, 186 248 L 806,248 A 62 62, 0, 0 0, 806 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">AverSumofEveryCourse</tspan>
</text>
</g>
<g>
<path fill="#F0E0FF" stroke="#9070A0" stroke-width="4" stroke-dasharray="none" d="M 372,3069 A 62 62, 0, 0 0, 372 3193 L 620,3193 A 62 62, 0, 0 0, 620 3069 Z"/>
<text x="496" y="3087" 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,496 496,571"/>
<polygon fill="#404040" stroke="none" points="496,589 513,558 478,558"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,744 496,819"/>
<polygon fill="#404040" stroke="none" points="496,837 513,806 478,806"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,992 496,1067"/>
<polygon fill="#404040" stroke="none" points="496,1085 513,1054 478,1054"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="496,1240 496,1346"/>
<polygon fill="#404040" stroke="none" points="496,1364 513,1333 478,1333"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 310,341 L 310,496 L 682,496 L 682,341 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="310,372 682,372"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="341,341 341,496"/>
<text x="511" y="390" 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,589 L 310,744 L 682,744 L 682,589 Z"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="310,620 682,620"/>
<polyline fill="none" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" points="341,589 341,744"/>
<text x="511" y="638" 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 124,837 L 124,992 L 868,992 L 868,837 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="124,868 868,868"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="155,837 155,992"/>
<text x="511" y="886" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="511" dy="62" unicode-bidi="embed">Real sum[COURSE_NUM]</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 124,1085 L 124,1240 L 868,1240 L 868,1085 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="124,1116 868,1116"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="155,1085 155,1240"/>
<text x="511" y="1134" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="511" dy="62" unicode-bidi="embed">Real aver[COURSE_NUM]</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="744,1426 1178,1426 1178,1532"/>
<polygon fill="#404040" stroke="none" points="1178,1550 1195,1519 1160,1519"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1178,2852 1178,2945 558,2945 558,1505"/>
<polygon fill="#404040" stroke="none" points="558,1488 540,1518 575,1518"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1178,1674 1178,1780"/>
<polygon fill="#404040" stroke="none" points="1178,1798 1195,1767 1160,1767"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1178,1922 1178,2369"/>
<polygon fill="#404040" stroke="none" points="1178,2387 1195,2356 1160,2356"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1178,2511 1178,2586"/>
<polygon fill="#404040" stroke="none" points="1178,2604 1195,2573 1160,2573"/>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 992,1550 L 992,1674 L 1364,1674 L 1364,1550 Z"/>
<text x="1178" y="1568" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">sum[j] = 0</tspan>
</text>
</g>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1426,1860 1736,1860 1736,1966"/>
<polygon fill="#404040" stroke="none" points="1736,1984 1753,1953 1718,1953"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1736,2170 1736,2263 1240,2263 1240,1939"/>
<polygon fill="#404040" stroke="none" points="1240,1922 1222,1952 1257,1952"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1364,1984 L 1364,2170 L 2108,2170 L 2108,1984 Z"/>
<text x="1736" y="2002" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1736" dy="62" unicode-bidi="embed">sum[j] = sum[j]+stu[i].score</tspan>
<tspan x="1736" dy="62" unicode-bidi="embed">[j]</tspan>
</text>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 992,1798 L 930,1860 L 992,1922 L 1364,1922 L 1426,1860 L 1364,1798 Z"/>
<text x="1178" y="1816" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">i = 0 to n-1</tspan>
</text>
</g>
<text x="1519" y="1754" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1519" dy="62" unicode-bidi="embed">Next</tspan>
</text>
<text x="1069" y="1940" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1069" dy="62" unicode-bidi="embed">Done</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 930,2387 L 930,2511 L 1426,2511 L 1426,2387 Z"/>
<text x="1178" y="2405" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">aver[j] = sum[i]/i</tspan>
</text>
</g>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 806,2604 L 682,2852 L 1550,2852 L 1674,2604 Z"/>
<text x="1178" y="2622" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1178" dy="62" unicode-bidi="embed">Output &quot;course %d: sum =</tspan>
<tspan x="1178" dy="62" unicode-bidi="embed"> %.0f,aver = %.0f\n&quot;, j + 1,</tspan>
<tspan x="1178" dy="62" unicode-bidi="embed"> sum[j], aver[j]</tspan>
</text>
</g>
</g>
<g>
<path fill="#FFE0A0" stroke="#A08040" stroke-width="4" stroke-dasharray="none" d="M 310,1364 L 248,1426 L 310,1488 L 682,1488 L 744,1426 L 682,1364 Z"/>
<text x="496" y="1382" 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="1320" 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="1506" 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>

After

Width:  |  Height:  |  Size: 9.1 KiB

@ -423,36 +423,92 @@ Step 2利用循环输入学生的学号成绩和各科成绩
Step 1:利用for循环给 sum 赋初值为 0
Step 2:利用第二重循环重新计算每个学生的总分
Step 3:计算每个学生的平均分
Step 4:将结果按照舒徐,总分和平均分的顺序进行输出
Step 4:将结果按照顺序,总分和平均分的顺序进行输出
![计算每个学生各门课程的总分和平均分](AverSumofEveryStudent.svg)
#### AverSumofEveryCourse
#### SortbyScore
Step 1:利用for循环给 sum 赋初值为 0
Step 2:利用第二重循环重新计算每门课程的总分
Step 3:计算每门课程的平均分
Step 4:将结果按照顺序,总分和平均分的顺序进行输出
![计算每门课程的总分和平均分](AverSumofEveryCourse.svg)
#### 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
Step 2:用循环从i+1到n-1比较,将较小的学号赋给k
Step 3:如果k与i不相等每一课的成绩交换
Step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 num 的元素从低到高排序](AsSortbyNum.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)
#### 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
## 代码实现
@ -516,7 +572,7 @@ int main(void)
int n = 0,m = 0;
STU stu[STU_NUM];
printf("Input student number(n<%d):",STU_NUM);
scnaf("%d",&n);
scanf("%d",&n);
printf("Input course number(m<=%d):",COURSE_NUM);
scanf("%d",&m);
while(1)
@ -559,7 +615,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!");
}
@ -572,351 +628,305 @@ int main(void)
```
int Menu(void)
{
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;
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
}
```
// 函数功能:输入 n 个学生的 m 门课成绩
```
void ReadScore(STU stu[],int n,int m)
{
function ReadScore(STU stu[],int n,int m) do
int i,j;
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]);
}
}
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
```
//函数功能:计算每个学生各门课程的总分和平均分
```
void AverSumofEveryStudent(STU stu[],int n,int m)
{
function AverSumofEveryStudent(STU stu[],int n,int m) do
int i,j;
for(i=0;i<n;i++)
{
for form i=0 to n-1 do
stu[i].sum = 0; //初始化每个学生总分为0
for(j=0;j<m;j++)
{
for from j=0 to m-1 do
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",i+1,stu[i].sum,stu[i].aver);
}
}
printf "student %d: sum = %.0f,aver = %.0f\n"
end
end
```
//函数功能:计算每门课程的总分和平均分
```
void AverSumofEveryCourse(STU stu[],int n,int m)
{
function AverSumofEveryCourse(STU stu[],int n,int m) do
int i,j;
float sum[COURSE_NUM],aver[COURSE_NUM];
for(j=0;j<m;j++)
{
for from j=0 to m-1 do
sum[j] = 0;
for(i=0;i<n;i++)
{
for from i=0 to n-1 do
sum[j]+= stu[i].score[j]; //计算n个同学每门课程的总分
}
end
aver[j] = sum[j]/i;
printf("course %d: sum = %.0f,aver = %.0f\n",j+1, sum[j], aver[j]);
}
}
printf "course %d: sum = %.0f,aver = %.0f\n"
end
end
```
//函数功能:按选择法将数组 sum 的元素值排序
```
voidSortbyScore(STU stu[],int n,int m,int(*compare)(float a,float b))
{
function SortbyScore(STU stu[],int n,int m,int(*compare)(float a,float b)) do
int i, j, k, t;
for (i=0; i<n-1; i++)
{
for from i=0 to n-2 do
k = i;
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
{
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门课程的成绩
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
```
//使数据按升序排序
```
int Ascending(float a,float b)
{
function Ascending(float a,float b) do
return a < b; //a<b
}
end
```
//使数据按降序排序
```
int Descending(float a,float b)
{
function Descending(float a,float b) do
return a > b; // 这样比较决定了按降序排序,如果 a>b则交换
}
end
```
//交换两个单精度浮点型数据
```
void SwapFloat(float *x,float *y)
{
function SwapFloat(float *x,float *y) do
float temp;
temp = *x;
*x = *y;
*y = temp;
}
end
```
//交换两个长整型数据
```
void SwapLong(long *x,long *y)
{
function SwapLong(long *x,long *y) do
long temp;
temp = *x;
*x = *y;
*y = temp;
}
end
```
//交换两个字符串
```
void SwapChar(char x[],chary[])
{
function SwapChar(char x[],char y[]) do
char temp[MAX_LEN];
strcpy(temp, x);
strcpy(x, y);
strcpy(y, temp);
}
end
```
//函数功能:按选择法将数组 num 的元素从低到高排序
```
void AsSortbyNum(STU stu[],int n,int m)
{
function AsSortbyNum(STU stu[],int n,int m) do
int i, j, k, t;
for (i=0; i<n-1; i++)
{
for from i=0 to n-2 do
int i, j, k, t;
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
{
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门课程的成绩
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
```
//函数功能:交换法实现字符串按字典顺序排序
```
void SortbyName(STU stu[],int n,int m)
{
function SortbyName(STU stu[],int n,int m) do
int i, j, t;
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
{
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门课程的成绩
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
```
//函数功能:按学号查找学生成绩并显示查找结果
```
void SearchbyNum(STU stu[],int n,int m)
{
function SearchbyNum(STU stu[],int n,int m) do
long number;
int i,j;
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");
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"
break;
}
if(i==n)
printf("\nNot found!\n");
}
end
if i==n
printf "\nNot found!\n"
end
```
//函数功能:按姓名查找学生成绩并显示查找结果
```
void SearchbyName(STU stu[],int n,int m)
{
function SearchbyName(STU stu[],int n,int m) do
char x[MAX_LEN];
int i,j;
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);
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"
return;
}
}
printf("\nNot found!\n);
}
end
end
printf "\nNot found!\n"
end
```
//函数功能:统计各分数段的学生人数及所占的百分比
```
void StatisticAnalysis(STU stu[],int n,int m)
{
funtion StatisticAnalysis(STU stu[],int n,int m) do
int i,j,t[6];
for(j=0;j<m;j++)
{
printf("For course %d:\n",j+1);
for from j=0 do m-1 do
printf "For course %d:\n"
memset(t,0,sizeof(t)); //将数组 t 的全部元素初始化为0
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);
}
}
}
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
```
//函数功能:打印学生成绩
```
void PrintScore(STU stu[],int n,int m)
{
function PrintScore(STU stu[],int n,int m) do
int i,j;
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);
}
}
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
```
//输出 n 个学生的学号、姓名及 m 门课程的成绩到文件 student.txt 中
```
void WritetoFile(STU stu[],int n,int m)
{
function WritetoFile(STU stu[],int n,int m) do
FILE *fp;
int i, j;
if((fp = fopen("student.txt","w")) == NULL)
{
printf("Failure to open score.txt!\n");
if fp = fopen("student.txt","w") == NULL do
printf "Failure to open score.txt!\n"
exit(0);
}
end
fprintf(fp, "%d\t%d\n", n, m); //将学生人数和课程门数写入文件
for (i=0; i<n; i++)
{
for from i=0 to n-1 do
fprintf(fp, "%10ld%10s", stu[i].num, stu[i].name);
for (j=0; j<m; j++)
{
for from j=0 to m-1 do
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 中
```
void ReadfromFile(STU stu[],int *n,int *m)
{
function ReadfromFile(STU stu[],int *n,int *m) do
FILE *fp;
int i, j;
if ((fp = fopen("student.txt","r")) == NULL)
{
printf("Failure to open score.txt!\n");
if fp = fopen("student.txt","r") == NULL do
printf "Failure to open score.txt!\n"
exit(0);
}
end
fscanf(fp, "%d\t%d", n, m); //从文件中读出学生人数,课程门数
for (i=0; i<*n; i++) //学生人数保存在n指向的储存单元
{
for from i=0 to *n-1 do //学生人数保存在n指向的储存单元
fscanf(fp, "%10ld", &stu[i].num);
fscanf(fp, "%10s", stu[i].name);
for (j=0; j<*m; j++) //课程门数保存在m指向的储存单元
{
for form j=0 to *m-1 do //课程门数保存在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
```

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

After

Width:  |  Height:  |  Size: 10 KiB

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

After

Width:  |  Height:  |  Size: 13 KiB

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

After

Width:  |  Height:  |  Size: 26 KiB

Loading…
Cancel
Save