Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created November 8, 2017 06:28
Show Gist options
  • Save anonymous/a5b2bc022554d03a719da0c23de126b8 to your computer and use it in GitHub Desktop.
Save anonymous/a5b2bc022554d03a719da0c23de126b8 to your computer and use it in GitHub Desktop.
def romanize(num)
D.map do |ltr, val|
amt, num = num.to_i.divmod(val)
ltr.to_s * amt
end.join
end
ARGV.each do |a|
puts romanize a
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment