RosettaCodeData/Task/Least-common-multiple/SenseTalk/least-common-multiple.sensetalk
2023-07-01 13:44:08 -04:00

12 lines
208 B
Text

function gcd m, n
repeat while m is greater than 0
put m into temp
put n modulo m into m
put temp into n
end repeat
return n
end gcd
function lcm m, n
return m divided by gcd(m, n) times n
end lcm