5.9 (Baggage Counter Charges) A baggage counter charges a $0.50 minimum fee to deposit a bag for up to three hours and an additional $0.25 per hour for each hour or part thereof over three hours. The maximum charge for any given 6-hour period is $1.00. Assume that no bags are deposited for longer than 6 hours at a time. Write a program that will calculate and print the baggage counter charges for each of five customers who deposited their bags at this counter. You should enter the hours deposited for each customer. Your program should print the results in a tabular format, and should calculate and print the total of all receipts of a day. The program should use the function calculate charges to determine the charge for each customer. Your outputs should appear in the following format: I T Customers Charge($) 0.50 0.50 0.50 0.75 1.00 3.25 Hours 2 3 4 5 ТОTAL 1.8 2.0 4.0 6.0 14.8

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter5: Repetition Statements
Section5.3: Interactive While Loops
Problem 6E: (Conversion) a. Write a C++ program to convert meters to feet. The program should request the...
icon
Related questions
Question

C language 

5.9 (Baggage Counter Charges) A baggage counter charges a $0.50 minimum fee to deposit
a bag for up to three hours and an additional $0.25 per hour for each hour or part thereof
over three hours. The maximum charge for any given 6-hour period is $1.00. Assume that
no bags are deposited for longer than 6 hours at a time.
Write a program that will calculate and print the baggage counter charges for each of five
customers who deposited their bags at this counter. You should enter the hours deposited
for each customer. Your program should print the results in a tabular format, and should
calculate and print the total of all receipts of a day. The program should use the function
calculate charges to determine the charge for each customer. Your outputs should appear
in the following format:
Charge($)
0.50
0.50
0.50
0.75
1.00
3.25
Customers
1
Hours
1
1.8
2.0
4.0
6.0
14.8
2
3
4
ТОTAL
Page
8
I 28
Transcribed Image Text:5.9 (Baggage Counter Charges) A baggage counter charges a $0.50 minimum fee to deposit a bag for up to three hours and an additional $0.25 per hour for each hour or part thereof over three hours. The maximum charge for any given 6-hour period is $1.00. Assume that no bags are deposited for longer than 6 hours at a time. Write a program that will calculate and print the baggage counter charges for each of five customers who deposited their bags at this counter. You should enter the hours deposited for each customer. Your program should print the results in a tabular format, and should calculate and print the total of all receipts of a day. The program should use the function calculate charges to determine the charge for each customer. Your outputs should appear in the following format: Charge($) 0.50 0.50 0.50 0.75 1.00 3.25 Customers 1 Hours 1 1.8 2.0 4.0 6.0 14.8 2 3 4 ТОTAL Page 8 I 28
Expert Solution
steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr