Ответ:
var
i, m, n, counter, sum: integer;
begin
writeln('Input M:');
readln(m);
writeln('Input N:');
readln(n);
sum:=0;
counter:=0;
for i:= m to n do
if i mod 3 = 0 then begin
inc(counter);
sum := sum + i
end;
writeln(counter,' ', sum)
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Ответ:
var
i, m, n, counter, sum: integer;
begin
writeln('Input M:');
readln(m);
writeln('Input N:');
readln(n);
sum:=0;
counter:=0;
for i:= m to n do
if i mod 3 = 0 then begin
inc(counter);
sum := sum + i
end;
writeln(counter,' ', sum)
end.