Permalink
Browse files

well, actually...

  • Loading branch information...
1 parent a7fddce commit 3dbfaef26aa2fc8d14aa479af97221e8e7525ce0 @asiansteev asiansteev committed May 7, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 Fibonator.rb
View
@@ -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 3dbfaef

Please sign in to comment.