C program to find HCF (Highest Common Factor) and LCM( Least Common Multiple): Today I will write a program on how to find HCF and LCM of two integers. HCF is also known as Greatest Common Divisor(GCD) or Greatest Common Factor(GCF).

Here there are three methods to find HCF and LCM in C Programming as follow:

  1. Find HCF and LCM using Loop
  2. Find HCF and LCM using Recursion
  3. Find HCF and LCM using Function

Find HCF and LCM in C Programming using Loop

Output of C Program:

 

Find HCF and LCM in C Programming using Recursion

Find HCF and LCM in C Programming using Function

Please comment if this code is useful to you or having any queries.