Algorithm to find lcm of two numbers

1. Start.

2. Read num1 and num2.

3. Calculate gcd of the numbers.
Refer  Find gcd

4. LCM=(num1 * num2)/GCD(num1 , num2)

5. Print LCM

6. End.

No comments:

Post a Comment