Question: Pseudocode Train Ticket for one person. Write a program that reads a persons age, then computes and displays the price the person needs to pay
Pseudocode
Train Ticket for one person. Write a program that reads a persons age, then computes and displays the price the person needs to pay for the train ride according to the following rules:
- Children younger than 6 years old ride for free.
- If the ticket is bought at the train station:
- A person over 70 years old pays $5.20
- Everyone else pays $11.50.
- If the ticket is bought inside the train, there is an extra charge of 15% compared to train station prices.
Note that a persons age is within the range of 0 to 120 years. Other inputs are considered error conditions.
Q1.1 Inputs, Outputs, and Error Conditions
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
