How to find LCM in Python
![](https://pythonpoint.net/wp-content/uploads/2020/12/how-to-find-lcm-in-python-1024x576.jpg)
LCM (Least Common Multiple) of two numbers is the smallest number which can be divided by both numbers.
Below is the program to find LCM of two numbers:
# lcm of two numbers a = 7 b = 53 if(a > b): minn = a else: minn = b while(1): if(minn%a == 0 and minn%b == 0): print("LCM is ", minn) break minn += 1
Output:
LCM is 371
Subscribe
Login
Please login to comment
0 Discussion