subject

A parking garage charges a $2.00 minimum fee to park for up to 3 hours. The garage charges an additional $0.50 per hour for each hour or part thereof in excess of 3 hours. The maximum charge for any given 24-hou period is $10.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 of 3 customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results in a neat tubular format, and should calculate and print the total of yesterday’s receipts. The program should use the function calculateCharges to determine the charge for each customer. Your output should appear in the following format:

Output:

Enter the hours parked for 3 cars:

1.5 4.0 24.0
Car Hours Charge
1 1.5 2.00
2 4.0 2.50
3 24.0 10.00
Total 29.5 14.50
#include
#include
Float calculateCharges(float);
main()
{
}
Float calculateCharges(float hours)
{
}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:40
It is vital to research each of the services you plan to disable before implementing any change, especially on critical machines such as the: a. servers in the test environment. b. domain controller and other infrastructure servers. c. desktops that have previously been attacked. d. desktops used by upper-level management.
Answers: 2
question
Computers and Technology, 22.06.2019 12:40
In a response of approximately 50 words, explain why it would be essential for the successful a/v technician to participate in additional coursework, presentations and seminars offered by equipment manufacturers as well as annual conferences attended by colleagues in the industry.
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
You know the right answer?
A parking garage charges a $2.00 minimum fee to park for up to 3 hours. The garage charges an additi...
Questions
question
Mathematics, 05.09.2019 06:10
question
Social Studies, 05.09.2019 06:10
Questions on the website: 13722361