Ответ:
program Nok;
var
a, b, i: Integer;
begin
Write ('Введите 2 числа: ');
ReadLn (a, b);
if a < b then
i := a
else
i := b;
repeat
Inc (i);
until (i mod a = 0) and (i mod b = 0);
WriteLn ('НОК = ', i);
ReadLn;
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
Ответ:
program Nok;
var
a, b, i: Integer;
begin
Write ('Введите 2 числа: ');
ReadLn (a, b);
if a < b then
i := a
else
i := b;
repeat
Inc (i);
until (i mod a = 0) and (i mod b = 0);
WriteLn ('НОК = ', i);
ReadLn;
end.