Question: I need with c + + Write a program to calculate parking cost for a vehicle considering the table below. Display the menu to the
I need with cWrite a program to calculate parking cost for a vehicle considering the table below. Display the menu to the user. Then, the program prompts the user to enter vehicle type. While the vehicle type is valid, the program will ask the user for duration in hours and calculate the parking cost for vehicles. While loop continues until the user enters a vehicle type different from the ones listed in the table.
tableVehicle type charRate per hourC or cAED L or lAED B or bAED
C or c: car
L or : lorry
or b: bus
Any other to exit
Please enter a vehicle type from the menu above:
C or c: car
L or : lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: c
Enter duration in hours:
The parking cost of the car is
C or c: car
L or : lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: b
Enter duration in hours:
The parking cost of the bus is :
C or c: car
L or : lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
