Compare commits

..

31 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
zhangyu 1e046ecec5 ZY-PrintScore
2 years ago
pvfj5ugro fd6c804976 Merge pull request 'SearchbyName' (#22) from XZL_SearchbyName into master
2 years ago
xuzigui fa5c4d5347 XZG_AsScotbyNum流程图
2 years ago
pvfj5ugro 9eae6c6625 Merge pull request 'XZL_SearchbyNum' (#21) from SearchbyNum into master
2 years ago
pvfj5ugro 67c8919844 Merge pull request 'XZG_SortbyScore流程图' (#20) from xzg_SortbyScore into master
2 years ago
xuzigui 7117c5e40b XZG_SortbyScore
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

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

After

Width:  |  Height:  |  Size: 7.0 KiB

@ -25,7 +25,7 @@
| C14 从文件中读取学生信息 | 李雨佳 | 李雨佳 | 张宇 徐子贵 | 许子林 | | C14 从文件中读取学生信息 | 李雨佳 | 李雨佳 | 张宇 徐子贵 | 许子林 |
每个成员的工作量(百分比): 每个成员的工作量(百分比):
| 李雨佳 | 徐子贵 | 许子林 | 张宇 | | 李雨佳 | 徐子贵 | 许子林 | 张宇 |
| ------ | ----- | ------ | --- | | ------ | ----- | ------ | --- |
|30 | 30 | 20 | 20 | |30 | 30 | 20 | 20 |
@ -423,34 +423,60 @@ Step 2利用循环输入学生的学号成绩和各科成绩
Step 1:利用for循环给 sum 赋初值为 0 Step 1:利用for循环给 sum 赋初值为 0
Step 2:利用第二重循环重新计算每个学生的总分 Step 2:利用第二重循环重新计算每个学生的总分
Step 3:计算每个学生的平均分 Step 3:计算每个学生的平均分
Step 4:将结果按照舒徐,总分和平均分的顺序进行输出 Step 4:将结果按照顺序,总分和平均分的顺序进行输出
![计算每个学生各门课程的总分和平均分](AverSumofEveryStudent.svg) ![计算每个学生各门课程的总分和平均分](AverSumofEveryStudent.svg)
#### AverSumofEveryCourse #### AverSumofEveryCourse
#### SortbyScore Step 1:利用for循环给 sum 赋初值为 0
Step 2:利用第二重循环重新计算每门课程的总分
Step 3:计算每门课程的平均分
Step 4:将结果按照顺序,总分和平均分的顺序进行输出
![计算每门课程的总分和平均分](AverSumofEveryCourse.svg)
#### SortbyScore #### SortbyScore
Step 1:利用循环将i赋值给k
Step 2:用循环从i+1到n-1比较,将较小的赋给k
Step 3:如果k与i不相等每一课的成绩交换
Step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 sum 的元素值排序](SortbyScore.svg)
#### AsSortbyNum #### AsSortbyNum
Step 1:利用循环将i赋值给k
Step 2:用循环从i+1到n-1比较,将较小的学号赋给k
Step 3:如果k与i不相等每一课的成绩交换
Step 4:总分,平均分,学号,姓名依次交换
![按选择法将数组 num 的元素从低到高排序](AsSortbyNum.svg)
#### SortbyName #### SortbyName
Step 1:利用for循环将相邻的两个姓名作比较
Step 2:如果前一个字符串大于后一个利用for循环交换m门课程的成绩
Step 3:依次交换
![交换法实现字符串按字典顺序排序](SortbyName.svg)
#### SearchbyNum #### SearchbyNum
Step 1:利用for循环给 i 赋值为 0 Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件判断学号是否一致 Step 2:利用 if 条件判断学号是否一致
Step 3:利用二次循环找出所有符合条件的学生 Step 3:利用二次循环找出所有符合条件的学生
Step 4:利用if条件语句能否找到该学生 Step 4:利用if条件语句能否找到该学生
![按学号查找学生成绩并显示查找结果](SearchbyNum.svg) ![按学号查找学生成绩并显示查找结果](SearchbyNum.svg)
#### SearchbyName #### SearchbyName
Step 1:利用for循环给 i 赋值为 0 Step 1:利用for循环给 i 赋值为 0
Step 2:利用 if 条件和循环判断是否有此学生并显示结果 Step 2:利用 if 条件和循环判断是否有此学生并显示结果
![按姓名查找学生成绩并显示查找结果](SearchbyName.svg) ![按姓名查找学生成绩并显示查找结果](SearchbyName.svg)
#### StatisticAnalysis #### StatisticAnalysis
Step 1:将数组 t 的全部元素初始化为0 Step 1:将数组 t 的全部元素初始化为0
@ -458,12 +484,31 @@ Step 2:利用循环和if条件统计各分数段学生人数
Step 3:利用循环和if条件统计各分数段学生所占比结果 Step 3:利用循环和if条件统计各分数段学生所占比结果
![统计各分数段的学生人数及所占的百分比](StatisticAnalysis.svg) ![统计各分数段的学生人数及所占的百分比](StatisticAnalysis.svg)
#### PrintScore #### PrintScore
Step 1:利用for循环输出学生的学号和姓名
Step 2:利用二次循环输出每位学生的成绩
Step 3:输出学生的总分数和平均分
![打印学生成绩](PrintScore.svg)
#### WritetoFile #### WritetoFile
Step 1:读取文件输出学生人数和课程门数
Step 2:利用循环for依次输出学生学号和姓名
Step 3:利用二次循环输出学生成绩
Step 4:输出总成绩和平均分
![输出n个学生的学号姓名以及m门课程的成绩](-WritetoFile.svg)
#### ReadfromFile #### ReadfromFile
Step 1:从文件中读取学生人数和课门数
Step 2:利用循环for输入学生学号和姓名
Step 3:利用二次循环输入学生成绩
Step 4:输入学生总成绩和平均分
![从文件中读取学生的学号,姓名及成绩等信息写入结构体](ReadfromFile.svg)
#### exit #### exit
## 代码实现 ## 代码实现
@ -527,7 +572,7 @@ int main(void)
int n = 0,m = 0; int n = 0,m = 0;
STU stu[STU_NUM]; STU stu[STU_NUM];
printf("Input student number(n<%d):",STU_NUM); printf("Input student number(n<%d):",STU_NUM);
scnaf("%d",&n); scanf("%d",&n);
printf("Input course number(m<=%d):",COURSE_NUM); printf("Input course number(m<=%d):",COURSE_NUM);
scanf("%d",&m); scanf("%d",&m);
while(1) while(1)
@ -570,7 +615,7 @@ int main(void)
case 13:ReadfromFile(stu,&n,&m); case 13:ReadfromFile(stu,&n,&m);
break; break;
case 0: printf("Are you sure you want to exit?(Y/N):"); case 0: printf("Are you sure you want to exit?(Y/N):");
printf("End of program!); printf("End of program!");
exit(0); exit(0);
default:printf("Input error!"); default:printf("Input error!");
} }
@ -583,351 +628,305 @@ int main(void)
``` ```
int Menu(void) int Menu(void)
{ {
int itemSelected; set itemSelected
printf("Management for Students' scores\n"); printf "Management for Students' scores\n"
printf("1 Input record\n"); printf "1 Input record\n"
printf("2 Calculate total and average score of every course\n"); printf "2 Calculate total and average score of every course\n"
printf("3 Calculate total and average score of every student\n"); printf "3 Calculate total and average score of every student\n"
printf("4 Sort in descending order by score\n"); printf "4 Sort in descending order by score\n"
printf("5 Sort in ascending order by score\n"); printf "5 Sort in ascending order by score\n"
printf("6 Sort in ascending order by number\n"); printf "6 Sort in ascending order by number\n"
printf("7 Sort in dictionary order by name\n"); printf "7 Sort in dictionary order by name\n"
printf("8 Search by number\n"); printf "8 Search by number\n"
printf("9 Search by name\n"); printf "9 Search by name\n"
printf("10 Statistic analysis\n"); printf "10 Statistic analysis\n"
printf("11 List record\n"); printf "11 List record\n"
printf("12 Write to a file\n"); printf "12 Write to a file\n"
printf("13 Read from a file\n"); printf "13 Read from a file\n"
printf("0 Exit\n"); printf "0 Exit\n"
printf("Please Input your choice:"); printf "Please Input your choice:"
scanf("%d",&itemSelected); //读入用户输入 input itemSelected //读入用户输入
return itemSelected; return itemSelected
} }
``` ```
// 函数功能:输入 n 个学生的 m 门课成绩 // 函数功能:输入 n 个学生的 m 门课成绩
``` ```
void ReadScore(STU stu[],int n,int m) function ReadScore(STU stu[],int n,int m) do
{
int i,j; int i,j;
printf("Input student's ID ,name and score:\n"); printf "Input student's ID ,name and score:\n"
for(i=0,i<n;i++) //n for from i=0 to n-1 do //输入n个同学
{
scanf("%ld%s",&stu[i].num,stu[i].name); input stu[i].num,stu[i].name
for(j=0;j<m;j++) //m for form j=0 to m-1 do //输入m门成绩
scanf("%f",&stu[i].score[j]); 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; int i,j;
for(i=0;i<n;i++) for form i=0 to n-1 do
{
stu[i].sum = 0; //初始化每个学生总分为0 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]; //累加分数 stu[i].sum = stu[i].sum + stu[i].score[j]; //累加分数
} end
stu[i].aver = m>0 ? stu[i].sum /m : -1; 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; int i,j;
float sum[COURSE_NUM],aver[COURSE_NUM]; float sum[COURSE_NUM],aver[COURSE_NUM];
for(j=0;j<m;j++) for from j=0 to m-1 do
{
sum[j] = 0; sum[j] = 0;
for(i=0;i<n;i++) for from i=0 to n-1 do
{
sum[j]+= stu[i].score[j]; //计算n个同学每门课程的总分 sum[j]+= stu[i].score[j]; //计算n个同学每门课程的总分
end
}
aver[j] = sum[j]/i; 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 的元素值排序 //函数功能:按选择法将数组 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; int i, j, k, t;
for (i=0; i<n-1; i++) for from i=0 to n-2 do
{
k = i; k = i;
for (j=i+1; j<n; j++) for from i+1 to n-1 do
{ if (*compare)(stu[j].sum, stu[k].sum) set k = j;
if ((*compare)(stu[j].sum, stu[k].sum)) k = j; end
} if k != i
if (k != i) for from t=0 to m-1 do //交换m门课程的成绩
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[k].score[t], &stu[i].score[t]); SwapFloat(&stu[k].score[t], &stu[i].score[t]);
} end
SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分 SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分
SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分 SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分
SwapLong(&stu[k].num, &stu[i].num); //交换学号 SwapLong(&stu[k].num, &stu[i].num); //交换学号
SwapChar(stu[k].name, stu[i].name); //交换姓名 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 return a < b; //a<b
} end
``` ```
//使数据按降序排序 //使数据按降序排序
``` ```
int Descending(float a,float b) function Descending(float a,float b) do
{
return a > b; // 这样比较决定了按降序排序,如果 a>b则交换 return a > b; // 这样比较决定了按降序排序,如果 a>b则交换
} end
``` ```
//交换两个单精度浮点型数据 //交换两个单精度浮点型数据
``` ```
void SwapFloat(float *x,float *y) function SwapFloat(float *x,float *y) do
{
float temp; float temp;
temp = *x; temp = *x;
*x = *y; *x = *y;
*y = temp; *y = temp;
} end
``` ```
//交换两个长整型数据 //交换两个长整型数据
``` ```
void SwapLong(long *x,long *y) function SwapLong(long *x,long *y) do
{
long temp; long temp;
temp = *x; temp = *x;
*x = *y; *x = *y;
*y = temp; *y = temp;
} end
``` ```
//交换两个字符串 //交换两个字符串
``` ```
void SwapChar(char x[],chary[]) function SwapChar(char x[],char y[]) do
{
char temp[MAX_LEN]; char temp[MAX_LEN];
strcpy(temp, x); strcpy(temp, x);
strcpy(x, y); strcpy(x, y);
strcpy(y, temp); strcpy(y, temp);
} end
``` ```
//函数功能:按选择法将数组 num 的元素从低到高排序 //函数功能:按选择法将数组 num 的元素从低到高排序
``` ```
void AsSortbyNum(STU stu[],int n,int m) function AsSortbyNum(STU stu[],int n,int m) do
{
int i, j, k, t; 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; int i, j, k, t;
k = i; set k = i;
for (j=i+1; j<n; j++) for from j=i+1 to n-1 do
{ if stu[j].num < stu[k].num set k = j;
if (stu[j].num < stu[k].num) k = j; end
} if k != i do
if (k != i) for from t=0 to m-1 do //交换m门课程的成绩
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[k].score[t], &stu[i].score[t]); SwapFloat(&stu[k].score[t], &stu[i].score[t]);
} end
SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分 SwapFloat(&stu[k].sum, &stu[i].sum); //交换总分
SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分 SwapFloat(&stu[k].aver, &stu[i].aver); //交换平均分
SwapLong(&stu[k].num, &stu[i].num); //交换学号 SwapLong(&stu[k].num, &stu[i].num); //交换学号
SwapChar(stu[k].name, stu[i].name); //交换姓名 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; int i, j, t;
for (i=0; i<n-1; i++) for from i=0 to n-2 do
{ for from j = i+1 to n-1 do
for (j = i+1; j<n; j++) if strcmp(stu[j].name, stu[i].name) < 0 do
{ for from t=0 to m-1 do //交换m门课程的成绩
if (strcmp(stu[j].name, stu[i].name) < 0)
{
for (t=0; t<m; t++) //m
{
SwapFloat(&stu[i].score[t], &stu[j].score[t]); SwapFloat(&stu[i].score[t], &stu[j].score[t]);
} end
SwapFloat(&stu[i].sum, &stu[j].sum); //交换总分 SwapFloat(&stu[i].sum, &stu[j].sum); //交换总分
SwapFloat(&stu[i].aver, &stu[j].aver); //交换平均分 SwapFloat(&stu[i].aver, &stu[j].aver); //交换平均分
SwapLong(&stu[i].num, &stu[j].num); //交换学号 SwapLong(&stu[i].num, &stu[j].num); //交换学号
SwapChar(stu[i].name, stu[j].name); //交换姓名 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; long number;
int i,j; int i,j;
printf("Input the number you want to search:"); printf"Input the number you want to search:"
scanf("%ld",&number); input number
for(i=0;i<n;i++) forfrom i=0 to n-1 do
if(stu[i].num==number) if stu[i].num==number do
{ printf"\n"
printf("\n"); for from j=0 to m-1 do
for(j=0;j<m;j++) printf "%d\t"
printf("%d\t",stu[i].score[j]); printf "\n"
printf("\n");
break; break;
} end
if(i==n) if i==n
printf("\nNot found!\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]; char x[MAX_LEN];
int i,j; int i,j;
printf("Input the name you want to search:"); printf "Input the name you want to search:"
scanf("%s", x); input x
for(i=0;i<n;i++) for from i=0 to n-1 do
{ if strcmp(stu[i].name,x)==0 do
if(strcmp(stu[i].name,x)==0) printf "%ld\t%s\t",stu[i].num,stu[i].name"
{ for from j=0 to m-1 do
printf("%ld\t%s\t",stu[i].num,stu[i].name); printf "%.0f\t"
for(j=0;j<m;j++) end
{ printf ".0f\t%.0f\n"
printf("%.0f\t",stu[i].score[j]);
}
printf(".0f\t%.0f\n",stu[i].sum,stu[i].aver);
return; return;
} end
} end
printf("\nNot found!\n); 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]; int i,j,t[6];
for(j=0;j<m;j++) for from j=0 do m-1 do
{ printf "For course %d:\n"
printf("For course %d:\n",j+1);
memset(t,0,sizeof(t)); //将数组 t 的全部元素初始化为0 memset(t,0,sizeof(t)); //将数组 t 的全部元素初始化为0
for(i=0;i<n;i++) for from i=0 to n-1 do
{ if stu[i].score[j]>=0&&stu[i].score[j]<60 set t[0]++
if(stu[i].score[j]>=0&&stu[i].score[j]<60) t[0]++; else if stu[i].score[j]<70 set t[1]++;
else if(stu[i].score[j]<70) t[1]++; else if stu[i].score[j]<80 set t[2]++;
else if(stu[i].score[j]<80) t[2]++; else if stu[i].score[j]<90 set t[3]++;
else if(stu[i].score[j]<90) t[3]++; else if stu[i].score[j]<100 set t[4]++;
else if(stu[i].score[j]<100) t[4]++; else if stu[i].score[j]==100 set t[5]++;
else if(stu[i].score[j]==100) t[5]++; end
} for from i=0 to 4 do
for(i=0;i<=5;i++) if i==0 printf "<60\t%d\t%.2f%%\n"
{ else if i==5 printf "%d\t%d\t%.2f%%\n"
if(i==0) printf("<60\t%d\t%.2f%%\n",t[i],(float)t[i]/n*100); else printf "%d-%d\t%d\t%.2f%%\n"
else if(i==5) printf("%d\t%d\t%.2f%%\n",(i+5)*10,t[i],(float)t[i]/n*100); end
else printf("%d-%d\t%d\t%.2f%%\n",(i+5)*10,(i+5)*10+9,t[i],(float)t[i]/n*100); end
} end
}
}
``` ```
//函数功能:打印学生成绩 //函数功能:打印学生成绩
``` ```
void PrintScore(STU stu[],int n,int m) function PrintScore(STU stu[],int n,int m) do
{
int i,j; int i,j;
for (i=0; i<n; i++) for from i=0 to n-1 do
{ printf "%ld\t%s\t"
printf("%ld\t%s\t", stu[i].num, stu[i].name); for from j=0 to m-1 do
for (j=0; j<m; j++) printf "%.0f\t"
{ end
printf("%.0f\t", stu[i].score[j]); printf "%.0f\t%.0f\n"
} end
printf("%.0f\t%.0f\n", stu[i].sum, stu[i].aver); end
}
}
``` ```
//输出 n 个学生的学号、姓名及 m 门课程的成绩到文件 student.txt 中 //输出 n 个学生的学号、姓名及 m 门课程的成绩到文件 student.txt 中
``` ```
void WritetoFile(STU stu[],int n,int m) function WritetoFile(STU stu[],int n,int m) do
{
FILE *fp; FILE *fp;
int i, j; int i, j;
if((fp = fopen("student.txt","w")) == NULL) if fp = fopen("student.txt","w") == NULL do
{ printf "Failure to open score.txt!\n"
printf("Failure to open score.txt!\n");
exit(0); exit(0);
} end
fprintf(fp, "%d\t%d\n", n, m); //将学生人数和课程门数写入文件 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); 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]); fprintf(fp, "%10.0f", stu[i].score[j]);
} end
fprintf(fp, "%10.0f%10.0f\n", stu[i].sum, stu[i].aver); fprintf(fp, "%10.0f%10.0f\n", stu[i].sum, stu[i].aver);
} end
fclose(fp); fclose(fp);
} end
``` ```
//从文件中读取学生的学号、姓名及成绩等信息写入到结构体 stu 中 //从文件中读取学生的学号、姓名及成绩等信息写入到结构体 stu 中
``` ```
void ReadfromFile(STU stu[],int *n,int *m) function ReadfromFile(STU stu[],int *n,int *m) do
{
FILE *fp; FILE *fp;
int i, j; int i, j;
if ((fp = fopen("student.txt","r")) == NULL) if fp = fopen("student.txt","r") == NULL do
{ printf "Failure to open score.txt!\n"
printf("Failure to open score.txt!\n");
exit(0); exit(0);
} end
fscanf(fp, "%d\t%d", n, m); //从文件中读出学生人数,课程门数 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, "%10ld", &stu[i].num);
fscanf(fp, "%10s", stu[i].name); 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 fscanf(fp, "%10f", &stu[i].score[j]); //不能用%10.0f
} end
fscanf(fp, "%10f%10f", &stu[i].sum, &stu[i].aver); //不能用%10.0f fscanf(fp, "%10f%10f", &stu[i].sum, &stu[i].aver); //不能用%10.0f
} end
fclose(fp); 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,240 @@
<?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="2914" height="5549">
<rect x="0" y="0" width="2914" height="5549" 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,5283"/>
<polygon fill="#404040" stroke="none" points="372,5301 389,5270 354,5270"/>
<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">SortbyScore</tspan>
</text>
</g>
<g>
<path fill="#E0E0E0" stroke="#505050" stroke-width="4" stroke-dasharray="none" d="M 186,5301 A 62 62, 0, 0 0, 186 5425 L 558,5425 A 62 62, 0, 0 0, 558 5301 Z"/>
<text x="372" y="5319" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="372" dy="62" unicode-bidi="embed">Return Integer </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,5084 992,5177 434,5177 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,3020"/>
<polygon fill="#404040" stroke="none" points="992,3038 1009,3007 974,3007"/>
<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 1922,1860 1922,1966"/>
<polygon fill="#404040" stroke="none" points="1922,1984 1939,1953 1904,1953"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1922,2821 1922,2914 1054,2914 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="2387,2232 2604,2232 2604,2524"/>
<polygon fill="#404040" stroke="none" points="2604,2542 2621,2511 2586,2511"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2604,2666 2604,2790 1970,2790"/>
<polygon fill="#404040" stroke="none" points="1953,2790 1983,2807 1983,2772"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1457,2232 1209,2232 1209,2790 1873,2790"/>
<polygon fill="#404040" stroke="none" points="1891,2790 1860,2772 1860,2807"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1922,1984 L 1426,2232 L 1922,2480 L 2418,2232 Z"/>
<text x="1922" y="2157" fill="#FFFFFF" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="1922" dy="62" unicode-bidi="embed">if ((*compare)(stu[j].sum, stu</tspan>
<tspan x="1922" dy="62" unicode-bidi="embed">[k].sum))</tspan>
</text>
</g>
<g>
<path fill="#FFFFD0" stroke="#A0A070" stroke-width="4" stroke-dasharray="none" d="M 2418,2542 L 2418,2666 L 2790,2666 L 2790,2542 Z"/>
<text x="2604" y="2560" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2604" dy="62" unicode-bidi="embed">k = j</tspan>
</text>
</g>
<g>
</g>
<ellipse cx="1922" cy="2790" rx="31" ry="31" fill="#C04040" stroke="#602020" stroke-width="4"/>
<text x="2511" y="2126" fill="#000000" font-family="Arial" font-size="32pt" text-anchor="middle" direction="ltr">
<tspan x="2511" dy="62" unicode-bidi="embed">True</tspan>
</text>
<text x="1317" y="2126" 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,3131 1519,3131 1519,3299"/>
<polygon fill="#404040" stroke="none" points="1519,3317 1536,3286 1501,3286"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4929 1519,5053 1040,5053"/>
<polygon fill="#404040" stroke="none" points="1023,5053 1053,5070 1053,5035"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="837,3131 589,3131 589,5053 943,5053"/>
<polygon fill="#404040" stroke="none" points="961,5053 930,5035 930,5070"/>
<g>
<path fill="#FFD0D0" stroke="#A07070" stroke-width="4" stroke-dasharray="none" d="M 992,3038 L 806,3131 L 992,3224 L 1178,3131 Z"/>
<text x="992" y="3087" 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,3441 1519,3888"/>
<polygon fill="#404040" stroke="none" points="1519,3906 1536,3875 1501,3875"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4092 1519,4167"/>
<polygon fill="#404040" stroke="none" points="1519,4185 1536,4154 1501,4154"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4371 1519,4446"/>
<polygon fill="#404040" stroke="none" points="1519,4464 1536,4433 1501,4433"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1519,4650 1519,4725"/>
<polygon fill="#404040" stroke="none" points="1519,4743 1536,4712 1501,4712"/>
<g>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="1767,3379 2139,3379 2139,3485"/>
<polygon fill="#404040" stroke="none" points="2139,3503 2156,3472 2121,3472"/>
<polyline fill="none" stroke="#404040" stroke-width="8" stroke-dasharray="none" points="2139,3689 2139,3782 1581,3782 1581,3458"/>
<polygon fill="#404040" stroke="none" points="1581,3441 1563,3471 1598,3471"/>
<g>
<path fill="#C04040" stroke="#602020" stroke-width="4" stroke-dasharray="none" d="M 1705,3503 L 1705,3689 L 2573,3689 L 2573,3503 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1736,3503 1736,3689"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="2542,3503 2542,3689"/>
<text x="2139" y="3521" 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,3317 L 1271,3379 L 1333,3441 L 1705,3441 L 1767,3379 L 1705,3317 Z"/>
<text x="1519" y="3335" 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="3273" 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="3459" 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,3906 L 1054,4092 L 1984,4092 L 1984,3906 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,3906 1085,4092"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,3906 1953,4092"/>
<text x="1519" y="3924" 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,4185 L 1054,4371 L 1984,4371 L 1984,4185 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,4185 1085,4371"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,4185 1953,4371"/>
<text x="1519" y="4203" 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,4464 L 1054,4650 L 1984,4650 L 1984,4464 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1085,4464 1085,4650"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1953,4464 1953,4650"/>
<text x="1519" y="4482" 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,4743 L 1116,4929 L 1922,4929 L 1922,4743 Z"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1147,4743 1147,4929"/>
<polyline fill="none" stroke="#602020" stroke-width="4" stroke-dasharray="none" points="1891,4743 1891,4929"/>
<text x="1519" y="4761" 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="5053" rx="31" ry="31" fill="#FFD0D0" stroke="#A07070" stroke-width="4"/>
<text x="1271" y="3025" 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="3025" 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

Loading…
Cancel
Save