eval.in

Paste #182

Io — Io 20110912, pasted 5 years ago

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
fib := method(n,
  a := 0
  b := 1
  for(i, 1, n,
    c := a + b
    b := a
    a := c
  )
  a
)

fib(30) print

Program Output

832040

Exited with error status 40

Fork