Question: Code in Visual Studio C++ use beginner/intermediate code Write a C++ program that converts a string representing a number in Roman numeral form to decimal

Code in Visual Studio C++ use beginner/intermediate code  Code in Visual Studio C++ use beginner/intermediate code Write a C++

Write a C++ program that converts a string representing a number in Roman numeral form to decimal form. The symbols used in the Roman numeral system and their equivalents are given below: V 5 X 10 50 C 100 D 500 M 1000 For example, the following are Roman numbers (and their corresponding decimal values): XII (12); CII (102): XL (40). In converting the Roman numerals to decimal, you must add up the numeric value of each symbol with one exception. If a smaller roman symbol appears before a larger one in the string, then it must be subtracted in decimal conversion. This is why XL is 40, IV is 4, and XCI is 91 Make sure the program is able to handle lower case letters. Test your program for CIV, MDI, V DXCV, and VII

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!