Recursive C program to print Fibonacci series
February 8, 2020
Below is an example recursive C program to return Fibonacci series for a given number –
int fibonacci (int x){ if(n < 0){ printf("Invalid input"); exit(1); } else{ return ((n==1 || n==1)? n : fib(n-2) + fib(n-1)); } }