------art_7319_7898215.1224281271998
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Here's one way:

multiples  ]
(1..1000).each do |number|
  if (number % 2) 0 && (number % 6) 0
    multiples << number
  end
end
puts "multiples of 2 and 6 between 1 and 1000: #{multiples.join(', ')}"
print "sum of multiples: "
puts multiples.inject(0) { |sum, multiple| sum + multiple }

Regards,
Craig

------art_7319_7898215.1224281271998--