+ 3
How to use this function (C++) ?
I found this function in one of the challenges and I am not able to use this function to generate Fibonacci sequence, please help me. The program below contains just the function to show you guys. https://code.sololearn.com/cEJgpxcO1re4/?ref=app https://code.sololearn.com/cEJgpxcO1re4/?ref=app
4 Answers
+ 1
I found the same function used in a book and it used a loop. So finally this is the code
https://code.sololearn.com/cEJgpxcO1re4/?ref=app
+ 1
I just wrote the function for this question
+ 1
when I used blue's code (which I already did, but didn't work), I'm getting the output as 8
+ 1
No, 'i' in the for loop should be initialized to 0 because Fibonacci sequence starts from 0.