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

6 lines
No EOL
100 B
Ruby
Executable file

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