The greatest common divisor (GCD) of two positive integers is the largest integer that divides the numbers exactly. For example, the largest common factor of 14 and 21 is 7; for 13 and 22, it is 1; and for 45 and 27, it is 9. We can write a recursive formula for finding the GCD, given that the two numbers are called a and b, as
GCD(a, b) = a, if b = 0
GCD(a, b) = LCF(b, a%b), if b > 0
Implement this recursive formula as a recursive C++ function, and write a driver program that allows you to test it interactively.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.