Задача 4 Урок 12.1
Primary tabs
Решите с помощью цикла repeat/until:
Выведите на экран, все четные числа, делящиеся на 3 и на 6 нацело , лежащие в диапазоне от 35 до 117.
var a,b: integer;
begin
a:=35;
b:=117;
repeat
if((a mod 2) = 0) and ((a mod 3) = 0) and ((a mod 6) = 0)then
write(a, ' ');
a := a+1;
until (b<a);
readln();
end.
- Log in to post comments
- 1049 reads