Question: Given an integer n (input from the user), write a C++ program which determines the equivalent of n in the roman numeral system. The user

Given an integer n (input from the user), write a C++ program which determines the equivalent of n in the roman numeral system. The user will provide a value of n greater than 0 and less than 4000.

The symbols are :

Given an integer n (input from the user), write a C++ program

Only the symbols I,X, C and M can be repeated, up to 3 times. For instance, 15 cannot be represented by VVV (symbol V cannot be repeated); 15 must be represented as XV.

To get full mark, your solution must use

1 or 2 loops at most

1, 2, 3 or 4 switch instructions at most, and each switch can have up to 5 cases, including the default case

less than 11 if statements (ie. up to 10 if statements are allowed)

- to output the result : output only the number in the roman numeral system.

Example of what is displayed in the console:

Enter n 4

IV

+ 62% . 1 1 :42 https://culearn.carleton.ca/mooc lag question Given an integer n (input from the user), write a C++ program which determines the equivalent of n in the roman numeral system. The user will provide a value of n greater than 0 and less than 4000 The symbols are 4 Ix XL 40 50 90 100 400 500 900 1000 XC CD CM Only the symbols I,X, C and M can be repeated, up to 3 times. For instance, 15 cannot be represented by VVV (symbol V cannot be repeated); 15 must be represented as XV

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!