fork download
  1. def fib(n):
  2. a=0.0
  3. b=0.0
  4. c=1.0
  5. for i in range(0,n+1):
  6. print b
  7. b=b+c
  8. a=c
  9. c=b
  10. return
  11. fib(7)
Success #stdin #stdout 0.01s 4676KB
stdin
Standard input is empty
stdout
0.0
1.0
2.0
4.0
8.0
16.0
32.0
64.0