Write a function roman_to_int(char c) which converts a Roman numeral (upper or l
ID: 3620467 • Letter: W
Question
Write a function roman_to_int(char c) which converts a Romannumeral (upper or lower case) to decimal, i.e.,
roman_to_int('I') ==> 1
roman_to_int('V') ==> 5
roman_to_int('X') ==> 10
roman_to_int('L') ==> 50
roman_to_int('C') ==> 100
roman_to_int('D') ==> 500
roman_to_int('M') ==> 1000
and similarly for the corresponding lower case letters. Write a main function
which repeatedly (until end-of-file) asks the user to enter a single Roman
numeral (letter) followed by the ENTER key and prints the value in decimal.
Name your program roman1.cpp.