Skip to content

Instantly share code, notes, and snippets.

@ninjs
Created April 21, 2015 15:29
Show Gist options
  • Save ninjs/9ea235090e458ac31d3b to your computer and use it in GitHub Desktop.
Save ninjs/9ea235090e458ac31d3b to your computer and use it in GitHub Desktop.
sum = 0
(1...1000).each do |i|
if i % 3 == 0 || i % 5 == 0
sum += i
puts sum
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment