Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program call RomanNumeral_LastNameFirstName.cpp that converts a number entered in Roman numerals to a decimal. Your program should consist of a class, RomanType .

Write a program call RomanNumeral_LastNameFirstName.cpp that converts a number entered in Roman numerals to a decimal. Your program should consist of a class, RomanType. An object of type romanType should do the following:

Store the number as a Roman numeral.

Convert and store the number into decimal form.

Print the number as a Roman numeral or decimal number as requested by the user.

The decimal values of the Roman numerals are: M 1000 D 500 C 100 L 50 X 10 V 5 I 1

Test your program using the following Roman numerals: MCXIV, CCCLIX, MDCLXVI

OUTPUT

image text in transcribed

the output should be the same as above thanks

Enter a roman number: XI The equivalent of the Roman numeral XI is 11 ould you like to enter another Roman numeral (Y = yes or N = no) :Y Enter a roman number: IX The equivalent of the Roman numeral IX is 9 ould you like to enter another Roman numeral (Y = yes or N = no) :Y Enter a roman number: XC The equivalent of the Roman numeral XC is 90 ould you like to enter another Roman numeral (Y = yes or N = no) :Y Enter a roman number: CCCLIX The equivalent of the Roman numeral CCCLIX is 359 ould you like to enter another Roman numeral (Y = yes or N = no) :Y Enter a roman number: MCXIV The equivalent of the Roman numeral MCXIV is 1114 ould you like to enter another Roman numeral (Y = yes or N = no) :N

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

What is the relationship between diversity, inclusion, and equity?

Answered: 1 week ago