Data Structures and Algorithms20815 marksFactorial, Fibonacci Sequence, GCD, Tower of Hanoi
Write a program to find GCD of two numbers using recursion.
Write a program to find GCD of two numbers using recursion. [5]
The GCD (Greatest Common Divisor) of two numbers is based on the Euclidean Algorithm: - If b == 0, then GCD(a, b) = a - Otherwise, GCD(a, b) = GCD(b, a % b) This is a naturally recursive problem, and Recursion helps solve problems that are naturally recursive in structure. --- --- Input: num1 = 4...