You will be producing a list of phone calls with their associated costs. The data consists of the
phone number, the number of seconds of the call and the call billing type. The chart below
gives you the call code, call type and cost per minute. Call are charged for full minutes if they
extend 6 seconds into the next minute. For example, a call lasting 306 seconds will be billed for
5 minutes, whereas a call lasting 307 seconds will be billed for 6 minutes. The report will be
formatted in the layout below. The user will have the option to send the report to the screen,
to a file or to both. Remember to use a constant to name your input and output files.
At the end of the report, I want to see a summery with know the total minutes billed, The
number with the costliest call (include the cost) and the number with the longest call
(include the duration).
This program must use parallel arrays to process the data.
For the follow data record:
The output would be
Number Minutes Seconds Cost Call Type
========== ======= ======= ==== =======
Call Code Call type Cost per minute
1 Interstate 0.04
2 Intrastate 0.03
3 InterLATA 0.035
4 intraLATA 0.015
5 Local 0.01
Any other UNKNOWN 0.10