Загрузка данных
<mxfile host="app.diagrams.net">
<diagram name="BlockDiagrams" id="block-diagrams-page">
<mxGraphModel dx="1200" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1200" pageHeight="800">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- СХЕМА 1: Rational(num, den) (X = 40) -->
<mxCell id="s1_start" value="Начало
Rational(num, den)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="60" y="40" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="s1_cond" value="den == 0 ?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="80" y="110" width="120" height="60" as="geometry" />
</mxCell>
<mxCell id="s1_yes" value="numerator = 0;
denominator = 1;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="20" y="200" width="110" height="50" as="geometry" />
</mxCell>
<mxCell id="s1_no" value="numerator = num;
denominator = den;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="150" y="200" width="120" height="50" as="geometry" />
</mxCell>
<mxCell id="s1_end" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="85" y="290" width="110" height="35" as="geometry" />
</mxCell>
<mxCell id="e1_1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s1_start" target="s1_cond">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e1_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="s1_cond" target="s1_yes">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e1_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="s1_cond" target="s1_no">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e1_yes_end" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.25;entryY=0;" edge="1" parent="1" source="s1_yes" target="s1_end">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e1_no_end" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.75;entryY=0;" edge="1" parent="1" source="s1_no" target="s1_end">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- СХЕМА 2: DivN(number) (X = 330) -->
<mxCell id="s2_start" value="Начало
DivN(number)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="360" y="40" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="s2_cond" value="number != 0 ?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="360" y="110" width="140" height="60" as="geometry" />
</mxCell>
<mxCell id="s2_act" value="denominator =
denominator * number;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="350" y="200" width="160" height="50" as="geometry" />
</mxCell>
<mxCell id="s2_end" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="375" y="290" width="110" height="35" as="geometry" />
</mxCell>
<mxCell id="e2_1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s2_start" target="s2_cond">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e2_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s2_cond" target="s2_act">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e2_act_end" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s2_act" target="s2_end">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e2_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="s2_cond" target="s2_end">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="535" y="140" />
<mxPoint x="535" y="308" />
</Array>
</mxGeometry>
</mxCell>
<!-- СХЕМА 3: Add(first, second) (X = 580) -->
<mxCell id="s3_start" value="Начало
Add(first, second)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="600" y="40" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="s3_act" value="result.numerator =
first.num * second.den +
second.num * first.den;

result.denominator =
first.den * second.den;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="585" y="110" width="190" height="85" as="geometry" />
</mxCell>
<mxCell id="s3_ret" value="Возврат result" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="610" y="220" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="s3_end" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="625" y="290" width="110" height="35" as="geometry" />
</mxCell>
<mxCell id="e3_1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s3_start" target="s3_act">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e3_2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s3_act" target="s3_ret">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e3_3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s3_ret" target="s3_end">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<!-- СХЕМА 4: Div(first, second) (X = 840) -->
<mxCell id="s4_start" value="Начало
Div(first, second)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="880" y="40" width="160" height="40" as="geometry" />
</mxCell>
<mxCell id="s4_cond" value="second.num != 0 ?" style="rhombus;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" vertex="1" parent="1">
<mxGeometry x="880" y="110" width="160" height="60" as="geometry" />
</mxCell>
<mxCell id="s4_yes" value="result.num =
first.num * second.den;

result.den =
first.den * second.num;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="810" y="195" width="140" height="65" as="geometry" />
</mxCell>
<mxCell id="s4_no" value="result.num = 0;
result.den = 1;" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
<mxGeometry x="970" y="195" width="130" height="65" as="geometry" />
</mxCell>
<mxCell id="s4_ret" value="Возврат result" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;fillColor=#e1d5e7;strokeColor=#9673a6;" vertex="1" parent="1">
<mxGeometry x="890" y="280" width="140" height="40" as="geometry" />
</mxCell>
<mxCell id="s4_end" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;fillColor=#dae8fc;strokeColor=#6c8ebf;" vertex="1" parent="1">
<mxGeometry x="905" y="340" width="110" height="35" as="geometry" />
</mxCell>
<mxCell id="e4_1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s4_start" target="s4_cond">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="s4_cond" target="s4_yes">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="s4_cond" target="s4_no">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4_yes_ret" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.25;entryY=0;" edge="1" parent="1" source="s4_yes" target="s4_ret">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4_no_ret" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.75;entryY=0;" edge="1" parent="1" source="s4_no" target="s4_ret">
<mxGeometry relative="1" as="geometry" />
</mxCell>
<mxCell id="e4_ret_end" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="s4_ret" target="s4_end">
<mxGeometry relative="1" as="geometry" />
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>