Thursday, June 27, 2013

Write a recursive function to find nth term of a Fibonacci series.



int fibo(int n)
{
if(n==0 || n==1)
   return n;
else
   return(fibo(n-1) + fibo(n-2));
}

No comments:

Post a Comment