Урок 10. Задача 8
Primary tabs
Выведите на экран, все числа делящиеся на 3 из диапазона от 35 до 117 и нечетные числа, лежащие в диапазоне от 45 до 99.
var i: Integer;
begin
for i:=35 to 117 do
begin
if (i >= 35) and (i <= 117) and (i mod 3 = 0) then
write(i, ' ')
else
if (i >= 45) and (i <= 99) and (i mod 2 <> 1) then
write(i, ' ');
end;
readln();
end.консоль:
36 39 42 45 46 48 50 51 52 54 56 57 58 60 62 63 64 66 68 69 70 72 74 75 76 78 80 81 82 84 86 87 88 90 92 93 94 96 98 99 102 105 108 111 114 117
- Log in to post comments
- 602 reads