Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

BUS 6 4 0 Assignment # 3 Due Date: January 2 1 by 1 1 : 5 9 pm Code a program that calculates the

BUS 640 Assignment #3
Due Date: January 21 by 11:59 pm
Code a program that calculates the fee charged by a parking garage. Use the specifications below to code
the program:
Prompt the user to enter a number of hours parked
Calculate and print the parking fee based on the following criteria:
The garage charges a minimum fee of $5.00 for parking up to 2 hours.
The charge for each additional hour over 2 and up to 8 is $2.00 per-hour.
After 8 hours, the charge drops to $1.50 per-hour.
The maximum parking fee for a 24 hour period is $25.00, and you may assume that no one
parks for more than 24 hours.
Example:
Enter hours parked: 7
Your parking fee for? hours is 15.0
Example:
Enter hours parked: 11
Your parking fue fur 11 huurs is 21.5
Example:
Enter hours parked: 2
Your parking fee for 2 hours is 5.0
Example:
Enter hours parked: 16
Your parking fee for 16 hours is 25.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions