0% found this document useful (0 votes)
93 views1 page

Assignment#5

The document provides parking rates for cars, trucks, and senior citizens at the XYZ parking lot. Cars are charged $0.50 per hour after the first two free hours up to 10 hours total, at which point it is $0.25 per hour. Trucks are charged $1 per hour after the first free hour up to two hours, and $0.75 per hour for the next 12 hours. Senior citizens park for free. The program should accept a character (C, T, or S) and two times as input, calculate the charge based on the rates, round up the time parked, and output the arrival time, departure time, and cost for each vehicle, as well as a daily summary of

Uploaded by

api-3715806
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views1 page

Assignment#5

The document provides parking rates for cars, trucks, and senior citizens at the XYZ parking lot. Cars are charged $0.50 per hour after the first two free hours up to 10 hours total, at which point it is $0.25 per hour. Trucks are charged $1 per hour after the first free hour up to two hours, and $0.75 per hour for the next 12 hours. Senior citizens park for free. The program should accept a character (C, T, or S) and two times as input, calculate the charge based on the rates, round up the time parked, and output the arrival time, departure time, and cost for each vehicle, as well as a daily summary of

Uploaded by

api-3715806
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

The sign on the attendant’s booth at the XYZ parking lot is

XYZ VISITOR PARKING

Cars:
First 2 hours Free
Next 3 hours 0.50/hour
Next 10 hours .25/hour
Trucks:
First 1 hour Free
Next 2 hours 1.00/hours
Next 12 hours 0.75/hour
Senior Citizens: Free of charge

Write a program that will accept as input a one-character designator (C, T or S)


Followed by two military numbers in range of 0600-2200 (6:00 A.M to 10:00 P.M). The
program should
Then compute the appropriate charge and the round up time that car was parked.
The output should be printed for each vehicle , arrival time, departure time and coast.
Your program should also provide a summer at the end of each day indicating total cars,
trucks, and senior , time and fees

You might also like