Question: Need help written in c++ coding . HOMEWORK #8 The Cheathem Bus Company has a rate schedule based on the number of townlines crossed by

Need help written in c++ coding .  Need help written in c++ coding . HOMEWORK #8 The Cheathem

HOMEWORK #8 The Cheathem Bus Company has a rate schedule based on the number of townlines crossed 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 SO.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... Example: 1. Person X crosses 3 townlines Person X's fare will be S1.20. The breakdown is as follows: Base Rate... First 2 townlines crossed... Subsequent townlines crossed. S0.15 S0.55 S0.50 Total Fare S1.20 2. Person Y crossed 0 townlines. Person Y's fare will be $0.55. The breakdown is as follows: Base Rate... $0.55 Total Fare $0.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 crossa maximum of TEN townlines so the number input by the user must be an integer between 0 Your program should check for this and issue an appropriate error message whern a number less than 0 or greater than 10 is issued For output your program should echo the number of townlines crossed. Echo 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 printing umber of townlines crossed. Your program should then compute and print out the passenger's fare in dollars and point and scientific notation SHOULD NOT BE USED!!! cents. There should be only two digits after the decimal

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!