Last active
December 20, 2015 13:29
-
-
Save AlexVPopov/6139125 to your computer and use it in GitHub Desktop.
Project Euler 1
This file contains 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
Project Euler 1sum = 0 | |
(1...1000).each do |num| | |
sum += num if num % 3 == 0 || num % 5 == 0 | |
end | |
puts sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment