Write a program that reads several numbers and prints their equivalent Roman number.
Remember that Roman numbers make use seven uppercase letters, which correspond to the following values:
Letter | I | V | X | L | C | D | M |
Value | 1 | 5 | 10 | 50 | 100 | 500 | 1000 |
These are the rules of Roman numbers:
Input
Input consists of several natural numbers between 1 and 3999. (Roman people did not know zero, and the system described above cannot represent numbers greater than or equal to 4000.)
Output
For each number, print its equivalent Roman number.
Input
1 4 10 40 41 16 2708 999 3005
Output
1 = I 4 = IV 10 = X 40 = XL 41 = XLI 16 = XVI 2708 = MMDCCVIII 999 = CMXCIX 3005 = MMMV