Computers and Technology

C Programming

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)

{

}

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 02:30, noah2o2o
These factors limit the ability to attach files to e-mail messages. location of sender recipient's ability to open file size of file type of operating system used
Answers: 2
image
Computers and Technology, 23.06.2019 02:30, bre563
Research data that is presented using descriptive language is said to be
Answers: 2
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
image
Computers and Technology, 23.06.2019 23:40, dudedude1593
Which of the following calculates the total from the adjacent cell through the first nonnumeric cell by default, using the sum function in its formula? -average -autosum -counta -max
Answers: 1
Do you know the correct answer?
C Programming

A parking garage charges a $2.00 minimum fee to park for up to 3 hours. Th...

Questions in other subjects:

Konu
Mathematics, 06.01.2020 23:31
Konu
Social Studies, 06.01.2020 23:31