Question: Write in c++ Write a program to calculate the toll to be paid on a toll road. The toll to be paid is dependent on

 Write in c++ Write a program to calculate the toll to Write in c++

Write a program to calculate the toll to be paid on a toll road. The toll to be paid is dependent on the day and the time. The program should ask the user for the day and time and then print out the toll to be paid. Use the chart below to determine the toll. See sample output The following function should be used: determine toll - this function is pass in the hour of the day as an integer, whether it is am or pm as a character, and whether it is weekend or weekday as a character in that order. The function should return the the toll to be paid. Assume the user types in valid input Define the function below main and put the prototype before main. Note: Write thoughts on paper before you start coding! Weekday Tolls Before 7:00 am ($1.10) . 7:00 am to 10:59 am ($2.55) 11:00 am to 3:59 pm ($1.85) 4:00 pm to 7:59 pm (54.25) Starting 8:00 pm ($1.50) Weekend Tolls Before 7:00 am ($1.00) 7:00 am to 5:59 pm ($2.35) Starting 6:00 pm ($1.15) Sample Output #1 Enter the hour: B Is it AM or PM (A or P):P Is it Friday or Saturday (Y/N): Y Amount owed: $1.15 Sample Output #2 Enter the hour: 2 Is it AM or PM (A or P): P Is it Friday or Saturday (Y/N): n Amount owed: $1.85

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!