I need help programming this C++ program: Write a C++ console application that calculates and displays the charges for using a parking garage. The parking garage charges a $3.00 minimum fee to park for up to three hours. The garage charges an additional $0.85 per hour or fraction of an hour in excess of three hours. The maximum charge for any given 24-hour period is $20.00. You may assume that no car parks for longer than 24 hours at a time. Your program will use a function named calculateCharges to determine the charges based on the amount of time the car was parked. Your program will prompt the user for the number of hours parked in the garage. It will then display the parking charges for that transaction. Keep track of the number of transactions as well as accumulating the number of hours parked and the parking charges. Your program will execute repeatedly until the user enters a value for the number of hours parked that is less than or equal to zero. Your program will then display the number of transactions and totals for the number of hours parked and the parking charges.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter2: Using Data
Section: Chapter Questions
Problem 4E: In this chapter, you learned that although a double and a decimal both hold floating-point numbers,...
icon
Related questions
Question

I need help programming this C++ program:

Write a C++ console application that calculates and displays the charges for using a parking garage. The parking garage charges a $3.00 minimum fee to park for up to three hours. The garage charges an additional $0.85 per hour or fraction of an hour in excess of three hours. The maximum charge for any given 24-hour period is $20.00. You may assume that no car parks for longer than 24 hours at a time.

Your program will use a function named calculateCharges to determine the charges based on the amount of time the car was parked. Your program will prompt the user for the number of hours parked in the garage. It will then display the parking charges for that transaction. Keep track of the number of transactions as well as accumulating the number of hours parked and the parking charges. Your program will execute repeatedly until the user enters a value for the number of hours parked that is less than or equal to zero. Your program will then display the number of transactions and totals for the number of hours parked and the parking charges.

 

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structure chart
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,