any computer expert here Plz answer my question write a program in Java to find the HCF of two numbers using while loop
Answers
Answered by
0
public class GCD { public static void main(String[] args) { int n1 = 81, n2 = 153; while(n1 != n2) { if(n1 > n2) n1 -= n2; else n2 -= n1; } System.out.println("G.C.D = " + n1); } }
Similar questions