Answer the question
In order to leave comments, you need to log in
How to write the sum of all three-digit numbers divided by 8.9?
I am learning Pascal. I can't understand
The task sounds like this:
Write a program that among all 3-digit numbers that are divisible by 8 and 9. The program should display the numbers satisfying the condition and their sum.
Answer the question
In order to leave comments, you need to log in
for i:= 100 to 999 do
begin
if (i mod 8 = 0) or (i mod 9 = 0) then
begin
// Тут выводим, суммируем и т.д.
end;
end;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question