Skip to content

Instantly share code, notes, and snippets.

@AlexVPopov
Last active December 20, 2015 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexVPopov/6139125 to your computer and use it in GitHub Desktop.
Save AlexVPopov/6139125 to your computer and use it in GitHub Desktop.
Project Euler 1
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