- gcd(2, 12) = 2
- gcd(6, 12) = 6
- gcd(9, 12) = 3
- gcd(17, 12) = 1
a and b are two positive integers:
- If b = 0, then the answer is a
- Otherwise, gcd(a, b) is the same as gcd(b, a % b)
Write a function gcdRecur(a, b) that implements this idea recursively. This function takes in two positive integers and returns one integer.