Hey guys I'm in terrible need of some basic help, I was given this assignment and i can't quite figure it out, most of you will find this extremely basic however..;
A parking garage charges $6 flat rate to park for up to three hours. The garage charges an
additional $2.50 per hour for each hour after the three hours. The maximum charge for any given
24-hour period is $35. Assume that no car parks for longer than 24 hours at a time.
Write a program for a parking attendant that calculates and displays the parking charges for each
customer who parked a car in this garage. Make sure that the value entered is positive. Allow the
parking attendant to compute the charges for as many customers as desired without exiting the
program. The attendant will decide when to exit the program.
Make sure the program displays the charges for every car entered. Once the attendant decides
to stop, the program also displays the number of cars entered, the total dollar amount for all the
cars, and the average charge per car.
This is what I have so far but I can't figure out what i'm doing wrong..
This will calculate the cost for one car. Use a loop to do this for as many cars as the operator wants and make a variable for how many cars he enters and the total for all the cars so you can print those out at the end as well as the average. Also put in a statement to deal with if the number of hours entered is negative.