Fibonacci (optional)
round 1:
0 <-- previous
1 <-- current
1 <-- newround 2:
0
1 <-- previous
1 <-- current
2 <-- newSetup
Requirements
General
Loops
Tips
Last updated
round 1:
0 <-- previous
1 <-- current
1 <-- newround 2:
0
1 <-- previous
1 <-- current
2 <-- newLast updated
1) calculate the nth Fibonacci number
2) calculate the last Fibonacci number less than or equal to n
3) quit0 1 1 2 3 5 8 13 21 34temp = current
current += previous
previous = temp