write a program to print LCM of two numbers
Answers
Answered by
3
Answer:
Logic to find LCM of two numbers
Input two numbers from user. Store them in some variable say num1 and num2 .
Find maximum between two numbers. Store the result in some variable, say max . ...
If max is exactly divisible by both numbers. ...
If max is not divisible by both numbers. ...
Repeat steps 2 to 3 step till LCM is found.
Similar questions