Roman numbers. Write a program that converts a positive integer into the Romannumber

Chapter 3, Problem P3.23

(choose chapter or problem)

Roman numbers. Write a program that converts a positive integer into the Romannumber 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,999are represented. (2) As in the decimal system, the thousands, hundreds, tens, andones are expressed separately. (3) The num bers 1 to 9 are expressed asI 1II 2III 3IV 4V 5VI 6VII 7VIII 8IX 9As you can see, an I preceding a V or X issubtracted from the value, and you cannever have more than three Is in a row. (4)Tens and hundreds are done the same way,except that the let ters X, L, C and C, D, Mare used instead of I, V, X, respec tively.Your program should take an input, such as1978, and convert it to Roman numerals,MCMLXXVIII.

Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.

Becoming a subscriber
Or look for another answer

×

Login

Login or Sign up for access to all of our study tools and educational content!

Forgot password?
Register Now

×

Register

Sign up for access to all content on our site!

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back