daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 43 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @fib = Hash.new{ |hash, key| hash[key] = hash[key - 1] + hash[key - 2] }
  2. @fib[0] = @fib[1] = 1
  3.  
  4. puts 0.upto(30).map {|x| @fib[x]}.join(' ')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top