Hi! I'm newbie and this are my first steps. This is my solution for 
Modern Roman numerals using arrays and each.

<!-- Code -->

romans = 
[1000,'M'],[900,'CM'],[500,'D'],[400,'CD'],[100,'C'],[90,'XC'],[50,'L'],[40,'XL'],[10,'X'],[9,'IX'],[5,'V'],[4,'IV'],[1,'I']
result = []

puts "Please enter a number"
num = gets.chomp.to_i

print "\n" + num.to_s + " in Modern Roman Numerals is: "

romans.each do |nroman|
  number  = nroman[0]
  letter  = nroman[1]

  while num >= number
    result.push letter
    num -= number
  end

end

print result.join

<!-- #Code -->


cheers!!

Martin

-- 
Posted via http://www.ruby-forum.com/.