Questions by bjenkins - Page 25
Roman numbers. Write a program that converts a positive integer into the Roman number system. The Roman number system has digitsI=1V=5X=10L=50C=100D=500M=1,000Numbers are formed according to the following rules. (1) Only numbers up to 3,999 are represented. (2) As in the decimal system, the thousands, hundred, tens, and ones are expressed separately. (3) The numbers 1 to 9 are expressed asI=1II=2III=3IV=4V=5VI=6VII=7VIII=8IX=9As you can see, a I preceding a V or X is subtracted from the value, and you can never have more than three I's in a row. (4) Tens and hundreds are done the same way, except that the letters X, L, C and C, D, M are used instead of I, V, X, respectively.Your program should take an input, such as 1978, and convert it to Roman numerals, MCMLXXVIII.