Загрузка данных


<mxfile host="app.diagrams.net">
  <diagram name="Array-Task3-All3Functions" id="task3-all3">
    <mxGraphModel dx="1400" dy="800" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1400" pageHeight="900" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- ======================================================== -->
        <!-- КОЛОНКА 1 (СЛЕВА): ОСНОВНАЯ ПРОГРАММА main                -->
        <!-- ======================================================== -->

        <mxCell id="m_start" value="начало" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="120" y="40" width="140" height="35" as="geometry" />
        </mxCell>

        <!-- Ввод исходного массива A -->
        <mxCell id="m_loop_in" value="i := 0..9, 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="110" y="100" width="160" height="40" as="geometry" />
        </mxCell>

        <mxCell id="m_in_elem" value="вв. A[i]" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="120" y="165" width="140" height="35" as="geometry" />
        </mxCell>

        <!-- Вызов функции multNegative -->
        <mxCell id="m_call_p" value="P := multNegative(A, 10)" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="90" y="235" width="200" height="40" as="geometry" />
        </mxCell>

        <!-- Вызов функции buildArrayB -->
        <mxCell id="m_call_b" value="buildArrayB(A, B, 10, P)" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="90" y="305" width="200" height="40" as="geometry" />
        </mxCell>

        <!-- Цикл вывода построенного массива B -->
        <mxCell id="m_loop_out" value="i := 0..9, 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="110" y="375" width="160" height="40" as="geometry" />
        </mxCell>

        <mxCell id="m_out_elem" value="выв. B[i]" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="120" y="445" width="140" height="35" as="geometry" />
        </mxCell>

        <!-- Конец main -->
        <mxCell id="m_end" value="конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="120" y="525" width="140" height="35" as="geometry" />
        </mxCell>

        <!-- Связи main -->
        <mxCell id="ml1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="m_start" target="m_loop_in">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ml2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="m_loop_in" target="m_in_elem">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ml3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0;entryY=0.25;" edge="1" parent="1" source="m_in_elem" target="m_loop_in">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="60" y="183" />
              <mxPoint x="60" y="110" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ml4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_loop_in" target="m_call_p">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="310" y="120" />
              <mxPoint x="310" y="220" />
              <mxPoint x="190" y="220" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ml5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="m_call_p" target="m_call_b">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ml6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="m_call_b" target="m_loop_out">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ml7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="m_loop_out" target="m_out_elem">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="ml8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0;entryY=0.25;" edge="1" parent="1" source="m_out_elem" target="m_loop_out">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="60" y="463" />
              <mxPoint x="60" y="385" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="ml9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_loop_out" target="m_end">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="310" y="395" />
              <mxPoint x="310" y="505" />
              <mxPoint x="190" y="505" />
            </Array>
          </mxGeometry>
        </mxCell>


        <!-- ======================================================== -->
        <!-- КОЛОНКА 2 (ПОСЕРЕДИНЕ): ПОДПРОГРАММА multNegative         -->
        <!-- ======================================================== -->

        <mxCell id="fp_start" value="multNegative(A, N)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="500" y="40" width="170" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fp_init" value="P := 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="525" y="105" width="120" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fp_loop" value="i := 0..N-1, 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="505" y="170" width="160" height="40" as="geometry" />
        </mxCell>

        <mxCell id="fp_cond" value="A[i] &lt; 0" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="515" y="240" width="140" height="50" as="geometry" />
        </mxCell>

        <mxCell id="fp_mult" value="P := P * A[i]" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="440" y="325" width="120" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fp_merge" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" vertex="1" parent="1">
          <mxGeometry x="582" y="390" width="6" height="6" as="geometry" />
        </mxCell>

        <mxCell id="fp_ret" value="возврат P" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="690" y="450" width="130" height="35" as="geometry" />
        </mxCell>

        <!-- Связи multNegative -->
        <mxCell id="fpl1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="fp_start" target="fp_init">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fpl2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="fp_init" target="fp_loop">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fpl3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="fp_loop" target="fp_cond">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fpl4" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="fp_cond" target="fp_mult">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fpl5" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" edge="1" parent="1" source="fp_cond" target="fp_merge">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="670" y="265" />
              <mxPoint x="670" y="393" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fpl6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="fp_mult" target="fp_merge">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="500" y="393" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fpl7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0;entryY=0.25;" edge="1" parent="1" source="fp_merge" target="fp_loop">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="400" y="393" />
              <mxPoint x="400" y="180" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fpl8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="fp_loop" target="fp_ret">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="755" y="190" />
            </Array>
          </mxGeometry>
        </mxCell>


        <!-- ======================================================== -->
        <!-- КОЛОНКА 3 (СПРАВА): ПОДПРОГРАММА buildArrayB             -->
        <!-- ======================================================== -->

        <mxCell id="fb_start" value="buildArrayB(A, B, N, P)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="960" y="40" width="180" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fb_loop" value="i := 0..N-1, 1" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="970" y="105" width="160" height="40" as="geometry" />
        </mxCell>

        <mxCell id="fb_cond" value="A[i] &gt; 0" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="975" y="175" width="150" height="50" as="geometry" />
        </mxCell>

        <mxCell id="fb_yes" value="B[i] := A[i] + P" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="890" y="255" width="120" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fb_no" value="B[i] := A[i]" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="1090" y="255" width="120" height="35" as="geometry" />
        </mxCell>

        <mxCell id="fb_merge" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#000000;" vertex="1" parent="1">
          <mxGeometry x="1047" y="325" width="6" height="6" as="geometry" />
        </mxCell>

        <mxCell id="fb_ret" value="возврат" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="1170" y="390" width="120" height="35" as="geometry" />
        </mxCell>

        <!-- Связи buildArrayB -->
        <mxCell id="fbl1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="fb_start" target="fb_loop">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fbl2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;" edge="1" parent="1" source="fb_loop" target="fb_cond">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fbl3" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="fb_cond" target="fb_yes">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fbl4" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="fb_cond" target="fb_no">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="fbl5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="fb_yes" target="fb_merge">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="950" y="328" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fbl6" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0.5;exitY=1;entryX=1;entryY=0.5;" edge="1" parent="1" source="fb_no" target="fb_merge">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1150" y="328" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fbl7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=0;exitY=0.5;entryX=0;entryY=0.25;" edge="1" parent="1" source="fb_merge" target="fb_loop">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="850" y="328" />
              <mxPoint x="850" y="115" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="fbl8" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;strokeWidth=1.2;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="fb_loop" target="fb_ret">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1230" y="125" />
            </Array>
          </mxGeometry>
        </mxCell>

      </root>
    </mxGraphModel>
  </diagram>
</mxfile>