Question: This is a C++ program. Write a program that converts a number entered in Roman numerals to decimal form. Your program should consist of a
This is a C++ program.
Write a program that converts a number entered in Roman numerals to decimal form. Your program should consist of a class, romanType. An object of romanType should do the following:
1. The numbers should be store as a Roman numeral
2. Convert and store the number into decimal form.
3. Print the number as a Roman numeral or a decimal number as requested by the user. Write two separate functions - One to print the number as a Roman numeral and the other to print the number as a decimal number.
The decimal value of the Roman numerals are:
Remember, a large numeral preceding a smaller numeral means addition, so LX is 60. A smaller numeral preceding a larger numeral means subtraction, so XL is 40. Any place in a decimal number, such as the 1s place, the 10s place, and so on, requires frim zero to four Roman numerals.
4. Test the program using the following Roman numerals: MCXIV, CCCLIX, MDCLXVI and MCMXXIV.
IM 000T 009 OOT L 50 OT 5 1
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
