📅  最后修改于: 2022-03-11 14:52:17.215000             🧑  作者: Mango
//Calculating GCD with euclid's algorithm using recursion
public static int calcGCD(int num1, int num2) {
if (num2 == 0) {
return num1;
} else {
return calcGCD(num2, num1 % num2);
}
}