Python Compiler
num1 = int(input("Enter (int) num1 = ")) num2 = int(input("Enter (int) num2 = ")) max = (num1 > num2) and num1 or num2 while(1): if((max % num1 == 0) and (max % num2 == 0)): print("\nLCM of %d and %d: %d" % (num1, num2, max)); break max += 1
OUTPUT
Enter positive (int) num1 = 25 Enter positive (int) num2 = 36 LCM of 25 and 36: 900
×
Save as
Private
Tag
AJAX
Canvas
CSS
Google Charts
HTML
Javascript
jQuery
JSON
SASS
SVG
Description
Save