Var
i,s:integer;
begin
s:=0;
for i:=1 to 5 do s:=s+i;
Writeln('for: ',s);
s:=0; i:=1;
while i<=5 do begin<br> s:=s+i;
i:=i+1
end;
Writeln('while: ',s);
s:=0; i:=1;
repeat
s:=s+i;
i:=i+1
until i>5;
Writeln('repeat: ',s)
end.
Результат
for: 15
while: 15
repeat: 15