source/euler01.rb
def euler1(n)
  result = 0
  (1...n).each do |n|
    result += n if n % 3 == 0 or n % 5 == 0
  end
  return result
end
# Find the sum of all the multiples of 3 or 5 below 1000.
Find the sum of all the multiples of 3 or 5 below 1000.
Find the sum of all the multiples of 3 or 5 below 1000 .
def euler1(n)
  result = 0
  (1...n).each do |n|
    result += n if n % 3 == 0 or n % 5 == 0
  end
  return result
end
def euler1 ( n ) result = 0 ( 1 ... n ) . each do | n | result += n if n % 3 == 0 or n % 5 == 0 end return result end
Find the sum of all the multiples of 3 or 5 below 1000.
Find the sum of all the multiples of 3 or 5 below 1000 .
n