Question: Write a C++ program that converts a Roman number to its decimal number representation. Roman numerals whose decimal representations are integers between 1 and 3,999.
Write a C++ program that converts a Roman number to its decimal number representation. Roman numerals whose decimal representations are integers between 1 and 3,999.
Ex format:
Enter Roman Num: MCMLXXVIII
Roman Num to Integer: 1987
Use string datatype, no char. Function declaration should be used like: value(input.substr(0, 1))
Not like value(input[0])
(No using stdafx.h)
First write a function that yields the numeric value of each of the letters:
-
I=1
-
V=5
-
X = 10
-
L = 50
-
C = 100
-
D = 500
-
M = 1,000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
