Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ using iostream and namespace std Extra Credit Problem (20 points): integerToRoman One of the manys ways to represent a number is by using the

C++ using iostream and namespace std

image text in transcribed

Extra Credit Problem (20 points): integerToRoman One of the manys ways to represent a number is by using the Roman Numerals system. The system goes as follows 1. Has seven digits RomanInteger Value Digit 10 50 100 500 1000 2. Numbers are formatted accordingly a. Only numbers up to 3,999 are represented. b. As in the decimal system, the thousands, hundreds, tens, and ones are C. The numbers 1 to 9 are expressed as: II 2 IV 4 V 5 VI 6 VII 7 VIII 8 IX 9 Note that 4 is represented as IV and 9 is represented as IX. Your function MUST be named integerToRoman Your function takes one input argument an integer number Your function should print(cout) the Roman numera, with appropriate capitalization Your function should not return any value If the input argument is 184, the function should print CIV If the input argument is 498, the function should print CDXC If the input argument is 3999, the function should print MMMCMXCI)X Your mission, should you choose to accept it, is to write a function integerToRoman which takes an integer argument and print its Roman equivalent

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

More Books

Students also viewed these Databases questions

Question

__________ Based on an assumption that people dislike work.

Answered: 1 week ago