Question: GCD Using Recursion Description The GCD (Greatest Common Divisor) of two numbers is the largest number that divides both the numbers. You are given two
GCD Using Recursion
Description
The GCD (Greatest Common Divisor) of two numbers is the largest number that divides both the numbers. You are given two numbers. Determine their GCD.
Input Format:
The input contains the two numbers.
Output Format:
The output contains the GCD of the numbers
Sample Test Cases:
Input:
40 70
Output:
10
Input:
13 9
Output:
1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
