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 :
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 XVStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started