1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/// <summary> /// Finds the GCD of two numbers. (Recursively) /// </summary> public int gcd(int a, int b) { if(a == 0) return a; if(b == 0) return b; if(a>b) return gcd(a % b, b); else return gcd(a, b % a); }