Given two number x and y find product using recursion.
Input : x = 5, y = 2 Output : 10 Input : x = 100, y = 5 Output : 500
1) If x is less than y, swap the two variables value
2) Recursively find y times the sum of x
3) If any of them become zero, return 0
- Product of 2 numbers using recursion | Set 2
- Sum of natural numbers using recursion
- Find two numbers with sum and product both same as N
- Tail Recursion
- Mean of array using recursion
- Solving f(n)= (1) + (2*3) + (4*5*6) ... n using Recursion
- Sum of digit of a number using recursion
- Reverse a stack using recursion
- Practice Questions for Recursion | Set 1
- Practice Questions for Recursion | Set 3
- Practice Questions for Recursion | Set 2
- Practice Questions for Recursion | Set 4
- Practice Questions for Recursion | Set 5
- Practice Questions for Recursion | Set 7
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : jit_t