Problem
In this problem you will design and implement a Roman numeral calculator. The subtractive Roman numeral notation commonly in use today (Such as IV, meaning "4") was used only rarely 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 progarm will input two Roman numbers and an arithmatic operator and will print out the result of the operation, also as a Roman number. The values of the Roman digits are as follows:
I 1 V 5 X 10 L 50 C 100 D 500 M 1000
Thus the number MDCCCCLXXXXVI represents 1996. The arithmetic operators that your program should recognize in the input are +,-,*,/. These should perform the Ada operations of integer addition, subtraction, mutiplication, 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 a Roman number for printing. The following might be sample run of the program.
Output
Enter the first number: <------First prompt MCCXXVI <------Entered by the user The first number is 1226 Enter the second number: <------Second prompt LXVIIII <------Entered by the user The second number is 69 Enter the desired arithmetic operation: <-----Thrid prompt + <-----Entered by the user The sum of MCCXXI and LXVIIII is MCCLXXXXV (1295) <-----Ouput
Helpful Stuff:
Example
of String Parsing
Things to be turned in :
1. Source code
2. The output of the program
Problem
Write an Ada program to calculate exam statistics. The file Exam_Data contains an unknown number of exam scores. Each exam score is a whole number between 0 and 100. A negative value is used as a sentinel after the last exam score.Display the average exam score (rounded to one decimal place) and the numberof A's(scores between 90 and 100),B's (80 to 89), C's(70 to 79), D's60 to 69, and E's (scores less than 60).
Helpful Stuff:
Reading
a file
Professor:Dr.Stansifer
G.S.A : Rishi Gupta
Last Modified :3/11/99