SHARE
TWEET

Untitled

a guest Jun 27th, 2013 10 Never
  1. fib [0]: 1
  2. fib [1]: 1
  3. fib [n]: ((fib [(n - 2)]) + (fib [(n - 1)]))
  4.  
  5. main
  6. {
  7.     write ["Displaying nth Fibonacci number. Enter n: "]
  8.     n <- read
  9.     write [fib [n]]
  10.     0
  11. }
RAW Paste Data
Top