Roman Numeral Converter
Convert the given number into a roman numeral.
Roman numerals | Arabic numerals |
---|---|
M | 1000 |
CM | 900 |
D | 500 |
CD | 400 |
C | 100 |
XC | 90 |
L | 50 |
XL | 40 |
X | 10 |
IX | 9 |
V | 5 |
IV | 4 |
I | 1 |
All roman numerals answers should be provided in upper-case.
Tests
- Waiting: 1.
convertToRoman(2)
should return the stringII
. - Waiting: 2.
convertToRoman(3)
should return the stringIII
. - Waiting: 3.
convertToRoman(4)
should return the stringIV
. - Waiting: 4.
convertToRoman(5)
should return the stringV
. - Waiting: 5.
convertToRoman(9)
should return the stringIX
. - Waiting: 6.
convertToRoman(12)
should return the stringXII
. - Waiting: 7.
convertToRoman(16)
should return the stringXVI
. - Waiting: 8.
convertToRoman(29)
should return the stringXXIX
. - Waiting: 9.
convertToRoman(44)
should return the stringXLIV
. - Waiting: 10.
convertToRoman(45)
should return the stringXLV
. - Waiting: 11.
convertToRoman(68)
should return the stringLXVIII
- Waiting: 12.
convertToRoman(83)
should return the stringLXXXIII
- Waiting: 13.
convertToRoman(97)
should return the stringXCVII
- Waiting: 14.
convertToRoman(99)
should return the stringXCIX
- Waiting: 15.
convertToRoman(400)
should return the stringCD
- Waiting: 16.
convertToRoman(500)
should return the stringD
- Waiting: 17.
convertToRoman(501)
should return the stringDI
- Waiting: 18.
convertToRoman(649)
should return the stringDCXLIX
- Waiting: 19.
convertToRoman(798)
should return the stringDCCXCVIII
- Waiting: 20.
convertToRoman(891)
should return the stringDCCCXCI
- Waiting: 21.
convertToRoman(1000)
should return the stringM
- Waiting: 22.
convertToRoman(1004)
should return the stringMIV
- Waiting: 23.
convertToRoman(1006)
should return the stringMVI
- Waiting: 24.
convertToRoman(1023)
should return the stringMXXIII
- Waiting: 25.
convertToRoman(2014)
should return the stringMMXIV
- Waiting: 26.
convertToRoman(3999)
should return the stringMMMCMXCIX
/** * Your test output will go here */