The greatest common divisor of two integers a and b is the largest integer that divides both numbers without remainder; the function to compute it is denoted by gcd(a,b). The gcd function can be written recursively. If b equals 0, then a is the greatest common divisor. Otherwise, gcd(a,b) = gcd(b,a%b) where a%b is the remainder of a divided by b. Assume that a and b are integers. Write a recursive function my_gcd(a,b) that computes the greatest common divisor of a and b. Assume that a and b are integers.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here