Created
November 21, 2013 14:55
-
-
Save pcg79/7582980 to your computer and use it in GitHub Desktop.
Project Euler #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum = 0 | |
1000.times do |x| | |
sum += x if x % 3 == 0 || x % 5 == 0 | |
end | |
puts sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment