Skip to content

Instantly share code, notes, and snippets.

@usure
Created October 22, 2013 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save usure/7100525 to your computer and use it in GitHub Desktop.
Save usure/7100525 to your computer and use it in GitHub Desktop.
Fibonacci sequence in ruby
a = [1,2]
for i in 0..10
a.push(a[-1] + a[-2])
end
puts a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment