Skip to content

Instantly share code, notes, and snippets.

@zschallz
Created July 8, 2012 17:57
Show Gist options
  • Save zschallz/3072051 to your computer and use it in GitHub Desktop.
Save zschallz/3072051 to your computer and use it in GitHub Desktop.
Project Euler Problem 1
# Fizz buzz!
sum = 0;
(0..999).each do |i|
if i % 5 == 0 || i % 3 == 0 then
sum += i
end
end
print sum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment