Rose L.

asked • 24d

Programming 4-14

The short-term, 0-24 hours, parking fee, F, at an international airport is given by the following formula:


Parking Fee Equation

{ 5 , if 0 <= h <= 3

F= { 6 x int(h+1) , if 3 < h <= 9

{ 60 if 9 < h <= 24



where int(h + 1) is the integer value of h + 1. For example, int(3.2) = 3, int(4.8) = 4.


Write a program that prompts the user to enter the number of hours a car is parked at the airport and outputs the parking fee.

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.