Python Compiler
num1 = 45 num2 = 90 max = (num1 > num2) and num1 or num2 while(1): if((max % num1 == 0) and (max % num2 == 0)): print("LCM of %d and %d: %d" % (num1, num2, max)); break max += 1
OUTPUT
LCM of 45 and 90: 90
×

Save as Private