21
Общий раздел / Re: ещё про цикл дейкстры
« Последний ответ от Valery Solovey Январь 25, 2019, 05:24:49 pm »Чтобы было эффективно, можно воспользоваться флагом. Получится брейкозаменитель.
f = P1 or P2 ... or Pn;
while (f) do
if P1 then
S1;
else if P2 then
S2
...
else if Pn then
Sn
else
f = false;
end if
end while
f = P1 or P2 ... or Pn;
while (f) do
if P1 then
S1;
else if P2 then
S2
...
else if Pn then
Sn
else
f = false;
end if
end while