Guest User

Untitled

a guest
Nov 8th, 2017
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.16 KB | None | 0 0
  1. def romanize(num)
  2.   D.map do |ltr, val|
  3.     amt, num = num.to_i.divmod(val)
  4.     ltr.to_s * amt
  5.   end.join
  6. end
  7.  
  8. ARGV.each do |a|
  9.   puts romanize a
  10. end
Advertisement
Add Comment
Please, Sign In to add comment