This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 27th, 2013  |  syntax: C  |  size: 0.18 KB  |  views: 9  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }
clone this paste RAW Paste Data