Question: In C program #include /* This function prompts the user for a Roman Numeral and calls ProperRoman to validate the input until a valid Roman
In C program
#include
/* This function prompts the user for a Roman Numeral and calls ProperRoman to validate the input until a valid Roman Numeral is entered or the user types EXIT to end the program.
When the Roman Numeral is valid, the function returns true.
When EXIT is entered, the function returns false.
*/ bool Prompt(char romanNumeral[], int maxSize);
/* This function takes a Roman Numeral and validates that only legal digits have been entered.
The function returns true when a valid Roman Numeral is entered, otherwise
it returns false. */
bool ProperRoman (const char romanNumeral[]);
/*
This Function takes a valid Roman Numeral and sets the corresponding digits in decimalValues to the integer equivalent of the Roman Numeral. This array will simplify computing the decimal equivalent.
*/ void NumeralToDecimal (char romanNumeral[], int decimalValues[]);
/* This functions calculates the decimal equivalent of the Roman Numeral
*/ int CalculateDecimalValue (int decimalValues[], int numDigits);
Example output
Please input a value in Roman numerals or EXIT to quit: MM
MM = 2000
Please input a value in Roman numerals or EXIT to quit: MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
Error too many characters! Must be less than 21 characters.
Please input a value in Roman numerals or EXIT to quit: XYZ
Illegal Characters.
Please input a value in Roman numerals or EXIT to quit: MXVI
MXVI = 1016
Please input a value in Roman numerals or EXIT to quit: EXIT
Thank you for using the Roman Numeral to Decimal calculator. Goodbye!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
