Skip to content

Instantly share code, notes, and snippets.

@edmistond
Created January 20, 2010 02:27
Show Gist options
  • Save edmistond/281533 to your computer and use it in GitHub Desktop.
Save edmistond/281533 to your computer and use it in GitHub Desktop.
fib = [1,2]
begin
fib.push(fib[fib.length-1]+fib[fib.length-2])
end while fib[fib.length-1]<4000000
puts "size: #{fib.length}"
fib.each do |f|
puts f if f%2==0
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment