Algorithm MobayTerminal
This algorithm reads the activities of the bus terminal and accepts capacity, number of
entries for an unspecified number of buses, bus registration number and owner’s name, The
data entry stops when zero is entered as a bus registration number, and the algorithm
should print a breakdown of total toll, total due, flat charge and discount, for each bus.
Variable
name, busregnumber, name ;string
entries, capacity ; integer.
flatcharge, totaldue, discount, totaltoll; real
Start
Print "Montego Bay Bus Terminal"
Repeat
Print " Please enter bus registration number, add zero to stop data entry”
Read busregnumber
Print " Please enter owner's name?
Read name
Print "Please enter Capacity"
Read capacity
Print "Please enter number of entries"
Read entries
If capacity < 18 then
Flat charge = 50
else
Flat charge = 75
endif
Print “ The flat charge is;” flatcharge
total toll = entries * flat fee
Print “The total toll is ;” totaltoll
If entries < 150
discount = total toll * 0.03
else
discount = total toll * 0.1
endif
Print “The discount is; discount,
total due = total toll - discount
Print “ The total due is, totaldue,
Until busregnumber =0
Stop