Answered step by step
Verified Expert Solution
Link Copied!

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 c++Write 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.
\table[[Vehicle type (char),Rate per hour],[C or c,AED 1.5],[L or l,AED 2.5],[B or b,AED 3.5]]
C or c: car
L or 1: lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: h
C or c: car
L or 1: lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: c
Enter duration in hours: 4.5
The parking cost of the car is 6.75
C or c: car
L or 1: lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: b
Enter duration in hours: 3.5
The parking cost of the bus is : 12.25
C or c: car
L or 1: lorry
B or b: bus
Any other to exit
Please enter a vehicle type from the menu above: d
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning VB 2008 Databases

Authors: Vidya Vrat Agarwal, James Huddleston

1st Edition

1590599470, 978-1590599471

More Books

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago