Question: By using c++ and the SWITCH command please help HOMEWORK #8 The Cheathem Bus Company has a rate schedule based on the number of townlines

By using c++ and the SWITCH command please help  By using c++ and the SWITCH command please help HOMEWORK #8

HOMEWORK #8 The Cheathem Bus Company has a rate schedule based on the number of townlines cros by a passenger as he/she rides the bus. The base rate is S0.55. This is the charge for the first town a passenger travels within. An additional charge of S0.25 is assessed for each of the first two town lines crossed. For all townlines crossed after the first two, $0.15 is charged per townline... sed Example: 1. Person X crosses 3 townlines Person X's fare will be $1.20 The breakdown is as follows: Base Rate... First 2 townlines crossed.. S0.55 S0.50 S0.15 Total Fare S1.20 Person Y crossed O t Person Y's fare will be $0.55 The breakdown is as follows: 2. ownlines. Base Rate... S0.55 Total Fare S0.55 Your assignment is to write a program to compute a passenger's fare. Your program should begin by printing a brief description of its purpose. It should then ask for and read in the number of townlines crossed by the passenger. The Cheathem busses cross a maximum of TEN townlines so the number input by the user must be an integer between 0 and 10. Your program should check for this and issue an appropriate error message when a number less than 0 or greater than 10 is issued For output your program should echo the number of townlines crossed. Echo printing merely means that your program prints out the value of the variable used to store the user's input. This allows the user to verify that the fare was computed using the correct number of townlines crossed. passenger's fare in dolla point and scientific notation SHOULD NOT BE USED !!! Your program should then compute and print out the rs and cents. There should be only two digits after the decima

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!