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
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
Get step-by-step solutions from verified subject matter experts
