Question: PLEASE USE FUNCTIONS, USE , C++, MAKE SURE THE FUNCTION TAKES MORE THEN 3 Cars!!! A parking garage charges a $2.00 minimum fee to park

PLEASE USE FUNCTIONS, USE , C++, MAKE SURE THE FUNCTION TAKES MORE THEN 3 Cars!!!

A parking garage charges a $2.00 minimum fee to park for up to three hours. The garage charges an additional $0.50 per hour in excess of these initial three hours. The maximum charge for any given 24 hour period is $10.00. Assume no car parks for longer than 24 hours at a time. Write a program that calculates and prints the total parking charges for the customers who parked their cars in this garage yesterday (at least 3 cars) and the total for each car as well. So your program should run for a certain amount of car, process how much each car own and in the end, the total amount for the day (considering all cars) Your program should call the function double calculateCharges(double hours) to determine the charges. Input: A set of hours Output: The total #of cars, the total hours (displayed to 1 decimal point), and the total charges (rounded to 3 decimal points). Hint: take a look into library and functions fixed, showpoint and setprecision(n)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!