program FindLeastCommonMultiple;
varnum1, num2, temp, gcd, lcm: integer;
function FindGCD(a, b: integer): integer;beginwhile b <> 0 dobegintemp := b;b := a mod b;a := temp;end;FindGCD := a;end;
beginwrite('Enter first number: ');readln(num1);write('Enter second number: ');readln(num2);
gcd := FindGCD(num1, num2);lcm := (num1 * num2) div gcd;
writeln('Least common multiple of ', num1, ' and ', num2, ' is ', lcm);end.
program FindLeastCommonMultiple;
var
num1, num2, temp, gcd, lcm: integer;
function FindGCD(a, b: integer): integer;
begin
while b <> 0 do
begin
temp := b;
b := a mod b;
a := temp;
end;
FindGCD := a;
end;
begin
write('Enter first number: ');
readln(num1);
write('Enter second number: ');
readln(num2);
gcd := FindGCD(num1, num2);
lcm := (num1 * num2) div gcd;
writeln('Least common multiple of ', num1, ' and ', num2, ' is ', lcm);
end.