Question: Using string statements and for statements with if else statements Write a C++ program that converts a string representing a number in Roman numeral form
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 X 10 50 C 100 D 500 1000 or sce (and their oreponding decimal abe)>XI (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
