Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions