Question: C++ 1. Write a switch statement that will take the day of the week which is an integer input from user with a prompt Enter
1. Write a switch statement that will take the day of the week which is an integer input from user with a prompt "Enter a number from 1-7" and write out the name of the day. If the user input is 1 then print MONDAY, if 2 print TUESDAY, till if 7 print SUNDAY Rewrite the above switch statement so that if the input is 2 or 4 it will print "T/R Go to CIS 151 Class". 2. Write a parkingCharge program that asks for the type of vehicle (C or c for car, B or b for bus, and T or t for truck) and the hours that vehicle parked in the lot and computes the charge based on the following rates (car $2.25/hr, bus $3.50/hr, truck $5.75/hr). Rewrite the parkingCharge program using switch. 3. Following is a sample screen input (Bold Italic is used to indicate typical input) Type of vehicle? How many hours was your vehicle parked? 3 The output format is shown below PARKING LOT CHARGE Type of Vehicle: Total Charge: Truck $ 17.25
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
