Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

well, actually... #1

Merged
merged 1 commit into from

2 participants

@asiansteev

No description provided.

@ashleybot ashleybot merged commit cd7ed8e into ashleybot:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 7, 2012
  1. @asiansteev

    well, actually...

    asiansteev authored
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 4 deletions.
  1. +2 −4 Fibonator.rb
View
6 Fibonator.rb
@@ -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}"
Something went wrong with that request. Please try again.