It is better to use it to remove the method.
For example: 49 and 91
ab Temp
49 % 91 = 49
91 % 49 = 42
49 % 42 = 7
42 % 7 = 0
So the maximum equivalent number is 7.
Public class T {Public Static void main (string [] art) {int GCD = GCD (91, 49); System.out.println (GCD);} /** * Greatest Commisor * @param A * @param B * @Return */ Public Static Int GCD (int a, int B) {While (b! = 0) {int Temp = A%b; a = b; b = Temp;} Return a;}}}