Make your own free website on Tripod.com

6.18 A parking garage charges a $6.00 minimum fee to park for up to three hours. The garage charges an additional $1.50 per hour for each hour or part thereof in excess of three hours. The maximum charge for any given 254-hour period is $25.00. Assume that no car parks for longer than 24 hours at a time. Write a program that will calculate and print the parking charges for each customer who parked his or her car in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tabular format and should calculate and print the total of yesterday's receipts. The program should use the procedure CalculateCharges to determine the charge for each customer.

(Question taken from: "Visual Basic 6: How to Program" by Deitel & Deitel T. R. Nieto)