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


<mxfile host="app.diagrams.net">
  <diagram name="Page-1" id="flowchart-no-cross">
    <mxGraphModel dx="1200" dy="900" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- ==================== ОСНОВНОЙ АЛГОРИТМ (MAIN) ==================== -->
        <mxCell id="m_start" value="начало" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="30" width="140" height="40" as="geometry" />
        </mxCell>

        <mxCell id="m_init" value="k := 0&#xa;P := 1&#xa;j := 0&#xa;Num := 0" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="100" width="140" height="65" as="geometry" />
        </mxCell>

        <mxCell id="m_in" value="вв. n" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="195" width="140" height="40" as="geometry" />
        </mxCell>

        <mxCell id="m_inc_j" value="j := j + 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="265" width="140" height="40" as="geometry" />
        </mxCell>

        <!-- БЛОК ВЫЗОВА ФУНКЦИИ С ПОЛОСКАМИ ПО ГОСТУ -->
        <mxCell id="m_call" value="res := out_number(n)" style="shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="175" y="335" width="170" height="45" as="geometry" />
        </mxCell>

        <mxCell id="m_cond_f" value="res == true" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="410" width="140" height="60" as="geometry" />
        </mxCell>

        <mxCell id="m_calc" value="k := k + 1&#xa;P := P * n" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="500" width="140" height="45" as="geometry" />
        </mxCell>

        <mxCell id="m_cond_k4" value="k == 4" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="195" y="575" width="130" height="55" as="geometry" />
        </mxCell>

        <mxCell id="m_set_num" value="Num := j" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="200" y="660" width="120" height="35" as="geometry" />
        </mxCell>

        <mxCell id="m_loop_cond" value="в потоке есть ещё числа&#xa;(символ != '\n')" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="165" y="730" width="190" height="65" as="geometry" />
        </mxCell>

        <mxCell id="m_out" value="выв. k, P, Num" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="825" width="140" height="40" as="geometry" />
        </mxCell>

        <mxCell id="m_end" value="конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="190" y="895" width="140" height="40" as="geometry" />
        </mxCell>

        <!-- ПРЯМЫЕ СВЯЗИ ОСНОВНОЙ ВЕТКИ -->
        <mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_start" target="m_init">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_init" target="m_in">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_in" target="m_inc_j">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_inc_j" target="m_call">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e5" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_call" target="m_cond_f">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e6" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_cond_f" target="m_calc">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e7" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_calc" target="m_cond_k4">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e8" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_cond_k4" target="m_set_num">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e9" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_set_num" target="m_loop_cond">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- ОБХОДНЫЕ ЛИНИИ БЕЗ ПЕРЕСЕЧЕНИЙ СПРАВА -->
        <!-- Ветка 'нет' для k == 4: идет по внутреннему правому радиусу x=360 -->
        <mxCell id="e10" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_cond_k4" target="m_loop_cond">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="360" y="603" />
              <mxPoint x="360" y="710" />
              <mxPoint x="260" y="710" />
            </Array>
          </mxGeometry>
        </mxCell>

        <!-- Ветка 'нет' для res == true: идет по внешнему правому радиусу x=400 -->
        <mxCell id="e11" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_cond_f" target="m_loop_cond">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="400" y="440" />
              <mxPoint x="400" y="710" />
              <mxPoint x="260" y="710" />
            </Array>
          </mxGeometry>
        </mxCell>

        <!-- ПЕТЛЯ ЦИКЛА DO-WHILE СЛЕВА (ПО ШИРОКОЙ ТРАЕКТОРИИ x=70) -->
        <mxCell id="e12" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;entryX=0;entryY=0.5;" edge="1" parent="1" source="m_loop_cond" target="m_in">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="70" y="763" />
              <mxPoint x="70" y="215" />
            </Array>
          </mxGeometry>
        </mxCell>

        <!-- ВЫХОД ИЗ ЦИКЛА ВНИЗ -->
        <mxCell id="e13" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_loop_cond" target="m_out">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="e14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="m_out" target="m_end">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>


        <!-- ==================== ВЫНЕСЕННАЯ ФУНКЦИЯ (OUT_NUMBER) ==================== -->
        <mxCell id="f_start" value="нач. ф out_number (n)" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="580" y="100" width="180" height="40" as="geometry" />
        </mxCell>

        <mxCell id="f_cond" value="n % 2 != 0" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="600" y="180" width="140" height="60" as="geometry" />
        </mxCell>

        <mxCell id="f_ret_true" value="возврат true" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="510" y="280" width="110" height="40" as="geometry" />
        </mxCell>

        <mxCell id="f_ret_false" value="возврат false" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="720" y="280" width="110" height="40" as="geometry" />
        </mxCell>

        <!-- СВЯЗИ ВНУТРИ ФУНКЦИИ -->
        <mxCell id="fe1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="f_start" target="f_cond">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="fe2" value="да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=0;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="f_cond" target="f_ret_true">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <mxCell id="fe3" value="нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" edge="1" parent="1" source="f_cond" target="f_ret_false">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

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