HCF and LCM - Java Programme to find HCF and LCM.

To find the HCF and LCF of two number in Java programming, you have to ask to the user to enter the two number, to find the HCF and LCF of the given two number to display the value of the HCF and LCM of the two numbers on the output screen as shown in the following program.

Programme :

Output :
Enter Two number to find HCF and LCM : 
3 4
HCF : 1 and LCM : 12

Follow me on: