A hospital desires to computerize its daily parking activity. The parking opens its doors from 8 AM till 8 PM. Therefore; they bought a device to issue cards, at the entrance gate upon the visitor request, showing the arrival time. Upon leaving the parking the same card is inserted again in the same device by an employee at the exit door in order to send as input both the arrival and the leaving time to the computer. You are asked to write a C++ program that accepts as input the arrival time and leaving time as being two float numbers (for example, if the arrival time is 12:30, it will be inputted as 12.30 and using the built in function: floor(12.30) will result in the float value 12.0 on the other hand, if the departure time is 4:42, it will be inputted as 4.42 and using the built in function: ceil(4.42) will result in the float value 5.0 since any fraction of an hour will be charged as a full hour). These two floats are used to calculate the time spent inside the parking and to output the amount due with an additional 10% VAT tax. The rates are fixed as follows $5 for the first three hours and $2 for each additional hour. Your program must loop as long as the cahier wants to and must display at the end of the day the amount collected from all visitors.
Elias_2 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Elias_2 0 Newbie Poster
NathanOliver 429 Veteran Poster Featured Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
freeviewman 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.