View Single Post
Old 12-16-2004, 10:21 AM  
BackToMine
Confirmed User
 
Join Date: Nov 2004
Posts: 541
Quote:
Implement a program to calculate charges for long-distance telephone calls according to the following scheme.

The regular charge is £1.50 for the first three minutes (or part thereof) and 30p for any minute after the first three. Rates are reduced during certain times of the day according to the following table:

Starting Time Monday to Friday Saturday and Sunday
Before 8am 40% discount 60% discount
8am to 6pm (inclusive)Regular rate 60% discount
After 6pm 40% discount 60% discount

The input to the program is to consist of the day on which the call was begun, the starting time of the call and the end time of the call. No call is to be greater than ten hours duration.

The day is to be indicated by using a key letter: (M)onday, T(u)esday, (W)ednesday, (T)hursday, (F)riday, S(a)turday, (S)unday.

The times are to be entered to the nearest minute using a 24 hour clock format. Each time should consist of two parts - hours and minutes. Midnight is 00 hours 00 minutes. 1:35pm is represented as 13 hours and 35 minutes.

The program is to display the day of the week as a full name, the call duration in minutes and the total charge.

The program should execute in a loop and so consideration must be given to how the processing requirements are to end.

Complete the program by including a summary analysis which will determine the total number of calls made, the total duration of the calls and the total cost of the calls.
BackToMine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote