You were hired as a programmer by TNP (Telepono ng Pilipino) a phone company. TNP employs a metering scheme in computing the telephone bill. The metering scheme is as follows: Calls made on a weekday between 6:00 AM to 6:00 PM are charged at 2.50 pesos per minute. Charges made at other times during a weekday are charged a discounted rate of 2.00 pesos per minute. Calls made anytime on a weekend are charged a weekend rate of 1.50 pesos per minute. Your job is to write a program that will ask the user to enter the following information: (a) an integer representing the day the call was made, let 1 represent Monday, 2 represent Tuesday and so on, (b) an integer representing the time (in 24 hour format) the call started (c) an integer representing the length of time or duration of the call in minutes (assume that all calls are rounded to the next minute, i.e, a call lasting 2 minutes and 35 seconds is billed as a 3 minute call). The rate applied depends on the day the call was made and on the time the call was
Comments
Leave a comment