Skip to content

Latest commit

 

History

History

roman-numerals

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Problem Description

In the Kata you should write a function to convert from Arabic numerals to Roman Numerals.

The Romans wrote numbers using letters:

I --> 1
V --> 5
X --> 10
L --> 50
C --> 100
D --> 500
M --> 1000

Some examples of the roman numerals are:

    1 --> I         11 --> XI             400 --> CD
    2 --> II        12 --> XII            500 --> D
    3 --> III       13 --> XIII           900 --> CM
    4 --> IV        14 --> XIV           1000 --> M
    5 --> V         15 --> XV            2000 --> MM
    6 --> VI        20 --> XX
    7 --> VII       40 --> XL
    8 --> VIII      50 --> L
    9 --> IX        90 --> XC
   10 --> X         100 --> C

More information about Roman numerals

There is no need to be able to convert numbers larger than about 3000.

Acceptance test

1999 -> MCMXCIX