Skip to content

Commit

Permalink
Merge pull request #1 from asiansteev/master
Browse files Browse the repository at this point in the history
Nice. Much easier to read.

Josh knew of the #{} syntax, but I didn't know how to use it either.
  • Loading branch information
ashleybot committed May 7, 2012
2 parents a7fddce + 3dbfaef commit cd7ed8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Fibonator.rb
Expand Up @@ -13,12 +13,10 @@ def GetMeMyNumber(first, second)
i = GetMeMyNumber(first, second)
while i <= 4000000 do
puts i
if i % 2 == 0
sum += i
end
sum += i if i.even?
first = second
second = i
i = GetMeMyNumber(first, second)
end

puts "TOTAL " + sum.to_s
puts "TOTAL #{sum}"

0 comments on commit cd7ed8e

Please sign in to comment.