Урок 11 Задача 3
Primary tabs
Решите с помощью цикла while:
Выведите на экран, все нечетные числа, делящиеся на 3 нацело, лежащие в диапазоне от 35 до 117.
var i: integer;
begin
while (i<=117) do
begin
i:=i+1;
if ((i mod 2)=1)and((i mod 3)=0)and(35<=i)and(i<=117) then
write(i, ' ');
end;
writeln();
writeln('<<konec>>');
readln();
end.Решение
39 45 51 57 63 69 75 81 87 93 99 105 111 117
- Log in to post comments
- 605 reads