Программа:
Pascal:
var
y: real;
n, j: longint;
i, x: integer;
begin
write('x = '); readln(x);
write('y = '); readln(y);
j := MAXINT;
for i := 1 to j do
if i mod x = y then inc(n);
writeln(n, ' чисел');
end.
Результат:
x = 5
y = 3
429496729 чисел
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Программа:
Pascal:
var
y: real;
n, j: longint;
i, x: integer;
begin
write('x = '); readln(x);
write('y = '); readln(y);
j := MAXINT;
for i := 1 to j do
if i mod x = y then inc(n);
writeln(n, ' чисел');
end.
Результат:
x = 5
y = 3
429496729 чисел