C program to calculate LCM of given two numbers // C programming // C tutorials

preview_player
Показать описание
Hi ,
This video will help you to know how to write C program to calculate LCM of given two numbers
What is LCM ? -
LCM stands for Least Common Divisor, which is a value of two numbers that are evenly divisible by the two given numbers.

eg :
LCM of 12 and 15 is 60. Because 60 is the least number which is divided by both 12 and 15.

Factors of 12 are 2 * 2 * 3
Factors of 15 are 5 * 3
Now take the common number which is in both factors and all the numbers which are not common and multiply them.
Here 3 is common and 2,2 and 5 are not common. So we are taking both and multiplying.
After multiplication 3 * 2* 2* 5 = 60.

if you like the vide please subscribe my channel ,

Рекомендации по теме