# Python Program to find the LCM using function

0
2322
```def lcm(a, b):
if a > b: # choose the greater number
greater = a
else:
greater = b
while(True):
if((greater % a == 0) and (greater % b == 0)):
lcm = greater
break
greater += 1
return lcm
#_____main_____
num1 = int(input("Please enter first number: "))
num2 = int(input("Please enter second number: "))
print("The L.C.M. is", lcm(num1, num2))

Output 1:
The L.C.M. is 50
Output 2:
The L.C.M. is 72
```

इन्हें भी देखें।

Python Programs के लिये यहाँ click करें।

Python Program to find the LCM using function Program to find the LCM using function in python write a python Program to find the LCM using function write a Program to find the LCM using function write a program to find the LCM lcm program in python lcm program lcm program using function in python program to find the lcm of two numbers python program to find the lcm of two numbers write a python program to find the lcm of two numbers program to find the lcm of two numbers using function write a python program to find the lcm of two numbers using function program to find the lcm of two numbers in python program to find the lcm of a number python program to find lcm of given numbers write a program to find lcm of given numbers in python python program to find lcm of two numbers using functions Python Program to find the L.C.M. of two input number Program to find the L.C.M. of two input number in python write a python Program to find the L.C.M. of two input number write a program to find the L.C.M. of two input number write a program to find the L.C.M. of two input number in python