pascalabcnet/InstallerSamples/!Tutorial/06_ForWhileRepeat/while1.pas

14 lines
230 B
ObjectPascal
Raw Permalink Normal View History

// Цикл while. Вывод чисел с шагом 3
2015-05-14 22:35:07 +03:00
const n = 60;
begin
Println($'Числа от 1 до {n}, кратные 3');
2015-05-14 22:35:07 +03:00
var x := 3;
while x <= n do
2015-05-14 22:35:07 +03:00
begin
Print(x);
2015-05-14 22:35:07 +03:00
x += 3;
end;
Println;
end.