+ 4

Is this a valid program?

C++ code for printing an nth term in the Fibonacci sequence https://code.sololearn.com/cE9T0khlied8/?ref=app

13th Oct 2017, 8:44 PM
Jordan Anthony
Jordan Anthony - avatar
3 Answers
+ 1
you've lost 1 if you remember 1, 1, 2, 3, 5, 8... so your program print 8 if you input 5
13th Oct 2017, 10:38 PM
Aleksey Beliy
Aleksey Beliy - avatar
0
is that proper now?
13th Oct 2017, 10:40 PM
Jordan Anthony
Jordan Anthony - avatar
0
ye
13th Oct 2017, 10:41 PM
Aleksey Beliy
Aleksey Beliy - avatar