0
How to print fibonacci series
i need code
2 Answers
+ 1
int fib(int n)
{
if(n==0)return 0;
else if(n==1)return 1;
else
return fib(n-1)+fib(n-2);
}
it is a recursive function to print each term of Fibonacci series
now just take a loop from 1 to desired limit and call this function;
0
I have just code in java. Try to convert it.
https://code.sololearn.com/cM8HVyQmi6ut/?ref=app