The Econo Bus Company charges fares to passengers based on the number of travel
ID: 3904544 • Letter: T
Question
The Econo Bus Company charges fares to passengers based on the number of travel zones they cross. Additionally, discounts are provided for multiple passengers traveling together. Ticket fares are shown in the table below Zones Crossed 7.50 14.00 20.00 25.00 10.00 18.50 21.00 27.50 12.00 22.00 32.00 36.00 12.750 23.00 33.00 37.00 The logic for a program that accepts the number of passengers and zones crossed as input with the ticket charge as output has been developed and is shown in the flowchart below. Using the flowchart, write the pseudocode for the program.Explanation / Answer
* Image not clear....*
Pseudo Code:
getReady()
1. print "enter number of passengers"
2. input no.of passengers n
3. return n
determineCharge()
1. print "Enter number of zones crossed"
2. input zones
3. charge = CHARGE[passenger-1][zones]
4. print charge
5. print "Enter number of passengers"
6 input n
finish()
print "end of program"
return 0
START
1. int CHARGE[4][4]=array of fares;
2.int passengers
3 int zones
4 quit = yes
5 call getReady();
6 if(passengers quit is yes)
7 determineCharge();
8 else
9 finish()
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.