This is a C program to calculate and print the LCM and HCF or GCD of two numbers.
Program takes two numbers as input from the user and then calculates their LCM and HCF.
Basic Mathematics required:
- Euclid’s division Lemma and algorithm to find HCF or GCD(Greatest Common Divisor).
- Relation between the numbers and their LCM and HCF.
Program: Find LCM and HCF in C
Enter two numbers: 15 25 LCM : 75 HCF : 5
Share your code and queries in the comments.
Share this with your beginner friends.
Follow us on twitter.