Skip to content

Instantly share code, notes, and snippets.

@notmarkmiranda
Created November 28, 2015 02:24
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 notmarkmiranda/c9ca5038bbb72a9c516f to your computer and use it in GitHub Desktop.
Save notmarkmiranda/c9ca5038bbb72a9c516f to your computer and use it in GitHub Desktop.
Euler - 001.rb
x = 0
y = 0
while x < 1000 do
if ((x % 3 == 0) || (x % 5 == 0))
y += x
end
x = x + 1
end
puts y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment