Compare commits
No commits in common. 'master' and 'C11' have entirely different histories.
@ -1,28 +0,0 @@
|
||||
{
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cppbuild",
|
||||
"label": "C/C++: gcc.exe 生成活动文件",
|
||||
"command": "D:\\mingw64\\bin\\gcc.exe",
|
||||
"args": [
|
||||
"-fdiagnostics-color=always",
|
||||
"-g",
|
||||
"${file}",
|
||||
"-o",
|
||||
"${fileDirname}\\${fileBasenameNoExtension}.exe"
|
||||
],
|
||||
"options": {
|
||||
"cwd": "${fileDirname}"
|
||||
},
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"detail": "调试器生成的任务。"
|
||||
}
|
||||
],
|
||||
"version": "2.0.0"
|
||||
}
|
Before Width: | Height: | Size: 160 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 160 KiB |
@ -1,407 +0,0 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="e104r4jvqqDXH06fVmpZ" name="Page-1">
|
||||
<mxGraphModel dx="805" dy="664" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="3300" pageHeight="4681" background="none" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="2" value="main" style="ellipse;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="20" y="20" width="120" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="init" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="15" y="120" width="130" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="dispaly_menu" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="15" y="200" width="130" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="" style="shape=link;html=1;width=91;" edge="1" parent="1">
|
||||
<mxGeometry width="100" relative="1" as="geometry">
|
||||
<mxPoint x="79.5" y="120" as="sourcePoint"/>
|
||||
<mxPoint x="79.5" y="170" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="" style="shape=link;html=1;width=92;" edge="1" parent="1">
|
||||
<mxGeometry width="100" relative="1" as="geometry">
|
||||
<mxPoint x="79.5" y="200" as="sourcePoint"/>
|
||||
<mxPoint x="79.5" y="250" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="c==CMD_READ" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="290" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="c==CMD_SAVE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="390" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="c==CMD_PRINT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="490" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="c==CMD_QUERY" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="580" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="c==CMD_INSERT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="670" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="120" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="15" target="16">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="c==CMD_UPDATE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="770" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="c==CMD_DELETE" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="860" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="c==CMD_SORT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="960" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" value="c==CMD_CHART" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="1060" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="19" value="c==CMD_QUIT" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="1160" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="20" value="确定退出" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry y="1260" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="21" value="quit" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="10" y="1370" width="140" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="22" value="" style="shape=link;html=1;width=100;" edge="1" parent="1">
|
||||
<mxGeometry width="100" relative="1" as="geometry">
|
||||
<mxPoint x="79.5" y="1370" as="sourcePoint"/>
|
||||
<mxPoint x="80" y="1420" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="24" value="" style="whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1,"sourcePerimeterSpacing":0,"targetPerimeterSpacing":0};" vertex="1" collapsed="1" parent="1">
|
||||
<mxGeometry x="32.5" y="1460" width="95" height="45" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="25" value="" style="edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;sourcePerimeterSpacing=0;targetPerimeterSpacing=0;" edge="1" visible="0" target="24" parent="1" source="24">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint y="1492" as="sourcePoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="36" value="命令错误,请重新选择" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="277.5" y="1170" width="155" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="40" value="" style="shape=link;html=1;width=192;" edge="1" parent="1">
|
||||
<mxGeometry width="100" relative="1" as="geometry">
|
||||
<mxPoint x="340" y="447.5" as="sourcePoint"/>
|
||||
<mxPoint x="340" y="447.5" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="45" value="read_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="300" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="46" value="save_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="400" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="47" value="print_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="500" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="48" value="query_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="590" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="50" value="add_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="680" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="51" value="update_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="780" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="52" value="delete_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="870" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="53" value="sort_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="970" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="54" value="make_data" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="280" y="1070" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="56" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="17" target="18">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1170" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1120" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="57" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="2">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="70" y="80" as="sourcePoint"/>
|
||||
<mxPoint x="80" y="120" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="60" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="4">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="370" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="320" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="62" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="4" target="7">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="470" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="420" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="63" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="7" target="11">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="570" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="520" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="64" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="12">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="570" as="sourcePoint"/>
|
||||
<mxPoint x="90" y="480" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="65" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="12" target="13">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="770" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="720" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="66" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="13" target="14">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="770" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="720" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="69" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="16" target="17">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1070" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1020" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="70" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="18" target="19">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1070" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1020" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="71" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="19" target="20">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1270" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1220" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="72" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="20">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1270" as="sourcePoint"/>
|
||||
<mxPoint x="80" y="1370" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="73" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="21" target="24">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1270" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1220" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="74" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="105" target="36">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1270" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1220" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="75" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="103" target="54">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1070" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1020" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="76" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="101" target="53">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1070" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1020" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="77" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="99" target="52">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1070" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="1020" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="78" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="97" target="51">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="770" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="720" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="79" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="95" target="50">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="770" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="720" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="80" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="93" target="48">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="670" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="620" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="82" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="91" target="47">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="570" as="sourcePoint"/>
|
||||
<mxPoint x="270" y="525" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="83" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="89" target="46">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="470" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="420" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="84" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=none;" edge="1" parent="1" source="87" target="45">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="470" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="420" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="86" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="20">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="1470" as="sourcePoint"/>
|
||||
<mxPoint x="80" y="180" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="530" y="1295"/>
|
||||
<mxPoint x="530" y="240"/>
|
||||
<mxPoint x="530" y="180"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="88" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="7" target="87">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="325" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="325" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="87" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="310" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="90" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="89">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="425" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="425" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="89" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="410" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="92" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="12" target="91">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="525" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="525" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="91" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="510" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="94" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="13" target="93">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="615" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="615" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="93" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="600" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="96" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="14" target="95">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="705" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="705" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="95" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="690" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="98" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="15" target="97">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="805" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="805" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="97" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="790" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="100" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="16" target="99">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="895" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="895" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="99" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="880" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="102" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="17" target="101">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="995" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="995" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="101" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="980" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="104" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="18" target="103">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="1095" as="sourcePoint"/>
|
||||
<mxPoint x="280" y="1095" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="103" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="1080" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="106" value="" style="endArrow=none;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="19" target="105">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="160" y="1195" as="sourcePoint"/>
|
||||
<mxPoint x="287.5" y="1195" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="105" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="1180" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="107" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="200" y="1270" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="108" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="55" y="250" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="109" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="50" y="360" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="110" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="50" y="460" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="111" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="555" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="112" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="50" y="640" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="116" value="" style="endArrow=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="15">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="80" y="840" as="sourcePoint"/>
|
||||
<mxPoint x="80" y="840" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="117" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="14" target="15">
|
||||
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||
<mxPoint x="210" y="870" as="sourcePoint"/>
|
||||
<mxPoint x="260" y="820" as="targetPoint"/>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="119" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="740" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="121" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="840" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="122" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="930" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="123" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="1030" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="124" value="N" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="1130" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="125" value="Y" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||
<mxGeometry x="45" y="1230" width="30" height="30" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
Before Width: | Height: | Size: 12 KiB |
@ -1,67 +0,0 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="KfGg7ewQHjnR5lwAaYOd" name="Page-1">
|
||||
<mxGraphModel dx="832" dy="563" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="5" value="" style="edgeStyle=none;html=1;strokeColor=#130b0b;" parent="1" source="3" target="4" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="<font color="#0d0808">save_data</font>" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="90" y="70" width="170" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="4" target="6" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="<font color="#000000">输入文件名</font>" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="90" y="180" width="170" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="9" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="6" target="8" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="<font color="#000000">打开文件</font>" style="rounded=1;whiteSpace=wrap;html=1;gradientColor=#FFFFFF;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="100" y="260" width="150" height="50" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="8" target="10" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="8" target="16" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="430" y="380"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="8" value="<font color="#000000">打开文件成功?</font>" style="rhombus;whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="90" y="340" width="170" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="13" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="10" target="12" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="10" value="<font color="#000000">把所有库存记录写入文档</font>" style="shape=document;whiteSpace=wrap;html=1;boundedLbl=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="100" y="450" width="150" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="12" target="14" edge="1">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="<font color="#000000">关闭文件</font>" style="whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="100" y="560" width="150" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="14" value="" style="ellipse;whiteSpace=wrap;html=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="90" y="670" width="170" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" style="edgeStyle=none;html=1;strokeColor=#000000;" parent="1" source="16" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="170" y="650" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="430" y="650"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="<font color="#000000">提示打开文件失败</font>" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;rounded=1;fillColor=#FFFFFF;strokeColor=#000000;" parent="1" vertex="1">
|
||||
<mxGeometry x="350" y="510" width="160" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
@ -1,55 +0,0 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="XFK3w_GTDJXIYlRDLBu6" name="Page-1">
|
||||
<mxGraphModel dx="598" dy="531" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" background="#ffffff" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<mxCell id="8" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="2" target="7">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="2" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="100" y="50" width="120" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="10" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="7" target="9">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="7" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="160" width="160" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="12" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="9" target="11">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="16" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="9" target="15">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="380" y="290"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="9" value="" style="rhombus;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="60" y="250" width="200" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="18" value="" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="11" target="17">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="11" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="360" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="20" style="edgeStyle=none;html=1;strokeColor=#000000;" edge="1" parent="1" source="15">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="160" y="470" as="targetPoint"/>
|
||||
<Array as="points">
|
||||
<mxPoint x="380" y="470"/>
|
||||
</Array>
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="15" value="" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="300" y="360" width="160" height="70" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="17" value="" style="ellipse;whiteSpace=wrap;html=1;fillColor=#FFFFFF;strokeColor=#000000;" vertex="1" parent="1">
|
||||
<mxGeometry x="80" y="500" width="160" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
@ -1,354 +0,0 @@
|
||||
#define NAME_LEN 31
|
||||
#define MAX_PARTS 100
|
||||
//保存学生成绩信息的结构
|
||||
struct students
|
||||
{
|
||||
int number;
|
||||
char name[NAME_LEN + 1];
|
||||
int score;
|
||||
};
|
||||
static struct students stu[MAX_PARTS];
|
||||
static int num_parts = 0;
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
//定义常量
|
||||
#define CMD_QUIT 0
|
||||
#define CMD_QUERY 4
|
||||
#define CMD_INSERT 5
|
||||
#define CMD_UPDATE 6
|
||||
#define CMD_DELETE 7
|
||||
#define CMD_READ 1
|
||||
#define CMD_SAVE 2
|
||||
#define CMD_PRINT 3
|
||||
#define CMD_SORT 8
|
||||
#define CMD_CHART 9
|
||||
// 菜单命令的编号
|
||||
|
||||
// 函数声明
|
||||
void init(void);
|
||||
void quit(void);
|
||||
void display_menu(void);
|
||||
int make_choice(void);
|
||||
void read_data(void); // 读取
|
||||
void save_data(void); // 保存
|
||||
void print_data(void); // 打印
|
||||
void query_data(void); // 查询
|
||||
void add_data(void); // 添加
|
||||
void update_data(void); // 修改
|
||||
void delete_data(void); // 删除
|
||||
void sort_data(void); // 排序
|
||||
void make_chart(void); // 图表
|
||||
int confirm(const char *msg);
|
||||
|
||||
// 主程序
|
||||
int main(void)
|
||||
{
|
||||
init(); // 程序启动
|
||||
while (1)
|
||||
{
|
||||
display_menu();
|
||||
int c = make_choice();
|
||||
switch (c)
|
||||
{
|
||||
case CMD_QUERY:
|
||||
query_data();
|
||||
break;
|
||||
case CMD_INSERT:
|
||||
add_data();
|
||||
break;
|
||||
case CMD_UPDATE:
|
||||
update_data();
|
||||
break;
|
||||
case CMD_DELETE:
|
||||
delete_data();
|
||||
break;
|
||||
case CMD_READ:
|
||||
read_data();
|
||||
break;
|
||||
case CMD_SAVE:
|
||||
save_data();
|
||||
break;
|
||||
case CMD_PRINT:
|
||||
print_data();
|
||||
break;
|
||||
case CMD_SORT:
|
||||
sort_data();
|
||||
break;
|
||||
case CMD_CHART:
|
||||
make_chart();
|
||||
break;
|
||||
default:
|
||||
puts("命令错误,请重新选择");
|
||||
break;
|
||||
case CMD_QUIT:
|
||||
if (confirm("确定要退出吗?"))
|
||||
quit(); // 仅在确认后退出
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 函数定义
|
||||
void init(void)
|
||||
{
|
||||
puts("程序启动");
|
||||
}
|
||||
void quit(void)
|
||||
{
|
||||
puts("程序退出");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
void display_menu(void)
|
||||
{
|
||||
printf("\n%d 读取 | %d 保存 | %d 打印 | %d 查询 | %d 添加\n%d 修改 | %d 删除 | %d 排序 | %d 图表 | %d 退出\n\n", CMD_READ, CMD_SAVE, CMD_PRINT, CMD_QUERY, CMD_INSERT, CMD_UPDATE, CMD_DELETE, CMD_SORT, CMD_CHART, CMD_QUIT);
|
||||
}
|
||||
int make_choice(void)
|
||||
{
|
||||
int c; // 用户输入
|
||||
int n = 0; // 正确读入的数据项个数
|
||||
while (n == 0)
|
||||
{
|
||||
printf("请选择:");
|
||||
n = scanf("%d", &c); // 尝试读入整数 c
|
||||
scanf("%*[^\n]"); // 跳过一行中剩余的字符
|
||||
}
|
||||
return c;
|
||||
}
|
||||
|
||||
//查询
|
||||
void query_data(void)
|
||||
{
|
||||
int num;
|
||||
printf("输入学生学号: ");
|
||||
scanf("%d", &num);
|
||||
int f = -1;
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
if (num == stu[i].number)
|
||||
{
|
||||
f = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == -1)
|
||||
{
|
||||
printf("学生不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("学生学号:%d\n", stu[f].number);
|
||||
printf("学生姓名:%s\n", stu[f].name);
|
||||
printf("学生成绩:%d\n", stu[f].score);
|
||||
}
|
||||
}
|
||||
|
||||
//打印
|
||||
void print_data(void)
|
||||
{
|
||||
printf("NUMBER | NAME score\n");
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
printf("%d | %s %d\n", stu[i].number, stu[i].name, stu[i].score);
|
||||
}
|
||||
}
|
||||
|
||||
//添加
|
||||
void add_data(void)
|
||||
{
|
||||
int num;
|
||||
printf("输入学生学号:");
|
||||
scanf("%d", &num);
|
||||
int f = 0;
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
if (num == stu[i].number)
|
||||
{
|
||||
f = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == 0)
|
||||
{
|
||||
stu[num_parts].number = num;
|
||||
printf("输入学生姓名:");
|
||||
scanf("%s", &stu[num_parts].name);
|
||||
printf("输入学生成绩:");
|
||||
scanf("%d", &stu[num_parts].score);
|
||||
num_parts++;
|
||||
printf("学生 %d 添加成功\n", num);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("学生已存在");
|
||||
}
|
||||
}
|
||||
|
||||
//修改
|
||||
void update_data(void)
|
||||
{
|
||||
int num;
|
||||
printf("输入学生学号:");
|
||||
scanf("%d", &num);
|
||||
int f = 0;
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
if (num == stu[i].number)
|
||||
{
|
||||
f = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == 0)
|
||||
{
|
||||
printf("学生不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("输入学生学号:");
|
||||
scanf("%d", &stu[num].number);
|
||||
printf("输入学生姓名:");
|
||||
scanf("%s", stu[num].name);
|
||||
printf("输入学生成绩:");
|
||||
scanf("%d", &stu[num].score);
|
||||
printf("学生 %d 已更新", num);
|
||||
}
|
||||
}
|
||||
|
||||
//删除
|
||||
void delete_data(void)
|
||||
{
|
||||
int num;
|
||||
printf("输入学生学号:");
|
||||
scanf("%d", &num);
|
||||
int f = 0, i, j;
|
||||
for (i = 0; i < num_parts; i++)
|
||||
{
|
||||
if (num == stu[i].number)
|
||||
{
|
||||
f = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (f == 0)
|
||||
{
|
||||
printf("学生不存在");
|
||||
}
|
||||
else
|
||||
{
|
||||
for (j = i; j < num_parts - 1; j++)
|
||||
{
|
||||
stu[j] = stu[j + 1];
|
||||
}
|
||||
num_parts--;
|
||||
printf("删除成功");
|
||||
}
|
||||
}
|
||||
|
||||
void read_data(void)
|
||||
{
|
||||
puts("读取数据");
|
||||
printf("请输入文件名");
|
||||
char filename[256];
|
||||
scanf("%s", filename);
|
||||
|
||||
FILE *fp = fopen(filename, "r");
|
||||
if (fp == NULL)
|
||||
{
|
||||
perror(filename);
|
||||
return;
|
||||
}
|
||||
int i = 0;
|
||||
while (fscanf(fp, "%d,%[^,],%d", &stu[i].number, stu[i].name, &stu[i].score) == 3)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
fclose(fp);
|
||||
num_parts = i;
|
||||
printf("读取 %d 记录\n", num_parts);
|
||||
}
|
||||
|
||||
void save_data(void)
|
||||
{
|
||||
puts("保存数据");
|
||||
printf(" 请输入文件名");
|
||||
char filename[256];
|
||||
scanf("%s", filename);
|
||||
FILE *fp = fopen(filename, "r");
|
||||
if (fp == NULL)
|
||||
{
|
||||
perror(filename);
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
fprintf(fp, "%d,%s,%d\n", stu[i].number, stu[i].name, stu[i].score);
|
||||
}
|
||||
fclose(fp);
|
||||
printf("保存%d 成功", num_parts);
|
||||
}
|
||||
|
||||
//排序
|
||||
void sort_data(void)
|
||||
{
|
||||
printf("排序\n");
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
int change = 0;
|
||||
static struct students t;
|
||||
for (int j = 0; j < num_parts - i - 1; j++)
|
||||
{
|
||||
if (stu[j].number > stu[j + 1].number)
|
||||
{
|
||||
t = stu[j + 1];
|
||||
stu[j + 1] = stu[j];
|
||||
stu[j] = t;
|
||||
change = 1;
|
||||
}
|
||||
}
|
||||
if (!change)
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
int change = 0;
|
||||
static struct students t;
|
||||
for (int j = 0; j < num_parts - i - 1; j++)
|
||||
{
|
||||
if (stu[j].score > stu[j + 1].score)
|
||||
{
|
||||
t = stu[j + 1];
|
||||
stu[j + 1] = stu[j];
|
||||
stu[j] = t;
|
||||
change = 1;
|
||||
}
|
||||
}
|
||||
if (!change)
|
||||
break;
|
||||
}
|
||||
printf("排序已完成");
|
||||
}
|
||||
|
||||
void make_chart(void)
|
||||
{
|
||||
printf("NUMBER | NAME score\n");
|
||||
for (int i = 0; i < num_parts; i++)
|
||||
{
|
||||
printf("%d | %s ", stu[i].number, stu[i].name);
|
||||
for (int j = 0; j < stu[i].score; j++)
|
||||
{
|
||||
printf("*");
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
printf("图表\n");
|
||||
}
|
||||
|
||||
int confirm(const char *msg)
|
||||
{
|
||||
char c = 'n'; // 默认选择是 no
|
||||
printf("%s(Y/N): ", msg); // 提示输入 yes/no 进行确认
|
||||
scanf(" %c%*[^\n]", &c); // 读取第一个字符,忽略剩余字符
|
||||
return c == 'y' || c == 'Y'; // 返回确认结果
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
<mxfile host="65bd71144e">
|
||||
<diagram id="4rOLv9Xi8nasrVEhpD6I" name="第 1 页">
|
||||
<mxGraphModel dx="633" dy="615" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0"/>
|
||||
<mxCell id="1" parent="0"/>
|
||||
<<<<<<< HEAD
|
||||
<mxCell id="2" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;" vertex="1" parent="1">
|
||||
<mxGeometry x="250" y="180" width="80" height="80" as="geometry"/>
|
||||
=======
|
||||
<mxCell id="8" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="5">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="3" value="make_chart" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="260" y="120" width="140" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="4" value="" style="ellipse;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="260" y="490" width="140" height="80" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="9" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="5" target="6">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="5" value="读取文件" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="260" y="250" width="140" height="60" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="10" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="4">
|
||||
<mxGeometry relative="1" as="geometry"/>
|
||||
</mxCell>
|
||||
<mxCell id="6" value="显示文件" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||
<mxGeometry x="260" y="370" width="140" height="60" as="geometry"/>
|
||||
>>>>>>> 456f225eb01b97142f653b827d7c303650179ba6
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
Before Width: | Height: | Size: 41 KiB |