1
0
Fork 0
Project-Euler/Ruby/1-a.rb

10 lines
No EOL
115 B
Ruby
Executable file

#!/usr/bin/env ruby
sum = 0;
(1..999).each do |i|
if(i % 3 == 0 || i % 5 == 0) then
sum += i
end
end
puts sum