C++ Programming: From Problem Analysis to Program Design
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN: 9781337102087
Author: D. S. Malik
Publisher: Cengage Learning
Question
Book Icon
Chapter 10, Problem 6PE
Program Plan Intro

Implementation of a program to display the roman numeral or a positive integer.

Program Plan:

Write a C++ program with a main function and the required set of statements to accomplish the following:

Create a class romanType and declare the required variables and the member functions as well.

Define of the function set_Roman to store the number as a Roman numeral.

Then define the function to convert the roman number entered by the user to integer.

Definition of the function print_Roman to print the number as roman numeral

Define the function print_Integer to print the roman numeral as positive integer.

In the main function, we have to call all the functions as mentioned above.

Blurred answer
Students have asked these similar questions
Write a program that converts a number entered in Roman numerals to a positive integer. Your program should consist of a class, say, roman type. An object of type roman type should do the following: a.Store the number as a Roman numeral. b.Convert and store the number as a positive integer. c.Print the number as a Roman numeral or positive integer as requested by the user. The integer values of the Roman numerals are: M 100 D 500 c 100 L 50 x 10 v 5 I 1 d. Test your program using the following Roman numerals: Mcxiv, Ccclix, and Mdclxvi.
Write a program that converts a number entered in Roman numerals to decimal. your program should consist of a class, say, Roman. An object of type Roman should do the following:a. Store the number as a Roman numeral.b. convert and store the number into decimal.c. print the number as a Roman numeral or decimal number as requested by the user.the decimal number values of the Roman numerals are:M 1000D 500C 100L 50X 10V 5I 1
Write a program that converts a number entered in Roman numerals to a positive integer. Your program should consist of a class, say, romanType. An object of type romanType should do the following: a. Store the number as a Roman numeral. b. Convert and store the number as a positive integer. c. Print the number as a Roman numeral or positive integer as requested by the
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT