Guest User

Untitled

a guest
Jun 14th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  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(' ')
Add Comment
Please, Sign In to add comment