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


<mxfile host="app.diagrams.net" modified="2026-10-16T07:30:00.000Z" agent="Mozilla/5.0" version="21.0.0" type="device">
  <diagram id="lab15_task1" name="Задача 1">
    <mxGraphModel dx="1000" dy="1000" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />

        <!-- 1. Начало -->
        <mxCell id="node_start" value="Начало" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="340" y="40" width="120" height="40" as="geometry" />
        </mxCell>

        <!-- 2. Ввод st -->
        <mxCell id="node_input" value="Ввод строки st" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="320" y="110" width="160" height="45" as="geometry" />
        </mxCell>

        <!-- 3. Инициализация -->
        <mxCell id="node_init" value="kr = 0, kk = 0, kt = 0, i = 0" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="315" y="185" width="170" height="40" as="geometry" />
        </mxCell>

        <!-- 4. Цикл st[i] != '\0' -->
        <mxCell id="node_loop" value="st[i] ≠ '\0'" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="330" y="255" width="140" height="70" as="geometry" />
        </mxCell>

        <!-- 5. Проверка R -->
        <mxCell id="node_cond_r" value="st[i] = 'r' или&#xa;st[i] = 'R'" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="325" y="365" width="150" height="70" as="geometry" />
        </mxCell>

        <mxCell id="node_act_r" value="kr = kr + 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="340" y="465" width="120" height="35" as="geometry" />
        </mxCell>

        <!-- 6. Проверка K -->
        <mxCell id="node_cond_k" value="st[i] = 'k' или&#xa;st[i] = 'K'" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="325" y="530" width="150" height="70" as="geometry" />
        </mxCell>

        <mxCell id="node_act_k" value="kk = kk + 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="340" y="630" width="120" height="35" as="geometry" />
        </mxCell>

        <!-- 7. Проверка T -->
        <mxCell id="node_cond_t" value="st[i] = 't' или&#xa;st[i] = 'T'" style="rhombus;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="325" y="695" width="150" height="70" as="geometry" />
        </mxCell>

        <mxCell id="node_act_t" value="kt = kt + 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="340" y="795" width="120" height="35" as="geometry" />
        </mxCell>

        <!-- 8. Шаг i = i + 1 -->
        <mxCell id="node_step" value="i = i + 1" style="rounded=0;whiteSpace=wrap;html=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="340" y="860" width="120" height="35" as="geometry" />
        </mxCell>

        <!-- 9. Вывод -->
        <mxCell id="node_out" value="Вывод kr, kk, kt,&#xa;(kr + kk + kt)" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="540" y="852.5" width="170" height="50" as="geometry" />
        </mxCell>

        <!-- 10. Конец -->
        <mxCell id="node_end" value="Конец" style="rounded=1;whiteSpace=wrap;html=1;arcSize=50;strokeWidth=1.5;" vertex="1" parent="1">
          <mxGeometry x="565" y="930" width="120" height="40" as="geometry" />
        </mxCell>

        <!-- Связи (Стрелки) -->
        <mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="node_start" target="node_input">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

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

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

        <!-- Цикл: Вход Да -->
        <mxCell id="e4" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_loop" target="node_cond_r">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Цикл: Выход Нет (обход вправо к выводу) -->
        <mxCell id="e_loop_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_loop" target="node_out">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="625" y="290" />
            </Array>
          </mxGeometry>
        </mxCell>

        <!-- Ветка R: Да -->
        <mxCell id="e_r_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_r" target="node_act_r">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Ветка R: Нет (обход) -->
        <mxCell id="e_r_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_r" target="node_cond_k">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="495" y="400" />
              <mxPoint x="495" y="515" />
              <mxPoint x="400" y="515" />
            </Array>
          </mxGeometry>
        </mxCell>

        <mxCell id="e_r_out" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="node_act_r" target="node_cond_k">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Ветка K: Да -->
        <mxCell id="e_k_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_k" target="node_act_k">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Ветка K: Нет (обход) -->
        <mxCell id="e_k_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_k" target="node_cond_t">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="495" y="565" />
              <mxPoint x="495" y="680" />
              <mxPoint x="400" y="680" />
            </Array>
          </mxGeometry>
        </mxCell>

        <mxCell id="e_k_out" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="node_act_k" target="node_cond_t">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Ветка T: Да -->
        <mxCell id="e_t_yes" value="Да" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_t" target="node_act_t">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Ветка T: Нет (обход) -->
        <mxCell id="e_t_no" value="Нет" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;labelBackgroundColor=none;" edge="1" parent="1" source="node_cond_t" target="node_step">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="495" y="730" />
              <mxPoint x="495" y="845" />
              <mxPoint x="400" y="845" />
            </Array>
          </mxGeometry>
        </mxCell>

        <mxCell id="e_t_out" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="node_act_t" target="node_step">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

        <!-- Возврат цикла наверх (слева) -->
        <mxCell id="e_loop_back" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0;entryY=0.5;" edge="1" parent="1" source="node_step" target="node_loop">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="400" y="915" />
              <mxPoint x="270" y="915" />
              <mxPoint x="270" y="290" />
            </Array>
          </mxGeometry>
        </mxCell>

        <!-- Вывод -> Конец -->
        <mxCell id="e_out_to_end" style="edgeStyle=orthogonalEdgeStyle;rounded=0;html=1;exitX=0.5;exitY=1;entryX=0.5;entryY=0;" edge="1" parent="1" source="node_out" target="node_end">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>

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