parking garage help

Yes, this is an assignment and would like some input or advice before i proceed to do this. I will be using an array set up for this correct? And if there are any more points you guys could provide me with that would be great! Thanks for reading this and spending your time helping me! I really appreciate it!

A parking garage has 10 customers daily. The garage charges a $2.00 minimum fee to park up to two hours. The garage charges an addition 50 cents per hour for each hour (or part of an hour) over two hours. The maximum charge for any given 24-hour period is $8.00. All cars are gone by midnight. Write a program to calculate and print a summary of the charges for a day. For input the program will read the hours of usage for each of the 10 cars. The program will print the results in the form of a table in a neat format, as shown below.

Enter the hours parked for car 1: 1.5
Enter the hours parked for car 2: 4.1
Enter the hours parked for car 3: 2.0
Enter the hours parked for car 10: 0.5

Total Hours 24.6
Total Charge 43.50

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!