Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started