text: To Calculate the GCD of two numbers recursively, you can use \n1) Euclid's Algorithm:\n \nint gcd(int m, int n) {\n   if ((m % n) == 0)\n      return n;\n   else\n      return gcd(n, m % n);\n}\nOR\n2) Dijkstra's Algorithm\nint gcd(int m, int n) {\n   if(m == n)\n      return m;\n   else if (m > n)\n      return gcd(m-n, n);\n   else\n      return gcd(m, n-m);\n}\n  OR\n3) BRUTE force guessing\nint tryDivisor(int m, int n, int g) {\n   if (((m % g) == 0) && ((n % g) == 0))\n      return g;\n   else\n      return tryDivisor(m, n, g - 1);\n}\nIn this last one, g is a guess. If the guess works, then it returns the guess. Otherwise, it tries a smaller guess.