This is a recursive function to find the factorial of an integer if x 1. The following example generates the Fibonacci series for a given number using a recursive function Live Demo include int fibonacciint i ifi 0 return 0. Ifi 1 return 1.
Ifi 1 return 1.
The smallest of all sub-problems is called the base case. 1 2 34 56 Expected Result. T 3 2t 2 1 43. 3 6 12 24 Here we can see that the first term is a1 3 and an 2an-1.