0
I want to make this program using switch I don't know where to start?
Write a rogram thatc lculates parking fees for a multilevel parking ge age. Ask whether the driver is in a car or a truck. Charge the driver $2.00 for the first hour, $3.00 for the second, and $5.00 for more than 2 hours. If it is a truck, add $1.00 to the total fee.
4 Answers
+ 2
SAROKå½” COBRA
There are two types of vehicle truck or car
If driver drives 1 hour then charge is $2
If driver drives 2 hour then charge is $3
If driver drives more than 2 hours then charge is $5
So you can use if else here and calculate total charge. This charge would be according Car.
If driver drives truck then add $1 in calculated charge.
You can use switch case to decide whether it is truck or car.
+ 1
So where is your attempts?
+ 1
Thank you so much I understand
0
I don't know where to start?