I want help to solve this problem in pascal:
In this problem you will design and implement a Roman numeral calculator. Most people are unaware that the subtractive Roman numeral notation commonly in use today (such as IV Meaning 4) was only rarely used during the time of the Roman Republic and Empire. For ease of calculation, the Romans most frequently used a purely additive notation in which a number was simply the sum of its digits (4 equals IIII in this notation).
Each number starts with the digit of highest value and ends with the one of smallest value. This is the notation we will use in this problem.
Your program will input two Roman numbers and an arithmetic operator and print out the result of the operation, also as a Roman number. The values of the Roman digits are as follows:
Thus, the number MDCCCCLXXXVIIII represents 1989. The arithmetic operators that your program should recognize in the input are +, -, * and /. These should perform the Pascal operations of integer addition, subtraction, multiplication and division.
One way of approaching this problem is to convert the Roman numbers into integers, perform the required operation, and then convert the result back into Roman number for printing. The following might be a sample run of the program, for an interactive system.
Enter the first number:
The first number is 1226
Enter the second number:
The second number is 69
Enter the desired arithmetic operation:
The sum of MCCXXVI and LXVIIII is MCCLXXXXV (1295)
Your program should use a good style, appropriate comments, meaningful identifiers, proper indentation and avoid side effects.
It should also check for errors in the input, such as illegal digits or arithmetic operators and take appropriate actions when these are found. You may also have the program check to be sure that the numbers are in purely additive forms digits are followed only by digits of the same or lower value.
And I have to do the problem with just this sections:Choice Statements, Loop Statements, Procedures and Functions,Subrange,Arrays,Enumarated types,TextFiles and Records.