Solution (in English)
- Find out (input) what time Mary will arrive in Courtenay.Ā Store it in a variable calledĀ Ā Ā Ā āarrival timeā.
- Find out (input) availableĀ landing times.Ā Store it in a variable called āavailableā.
- Compare āarrival timeā with āavailableā.
- If āarrival timeā is less than or equal to āavailableā, Mary can land at the Courtenay Airport.
- If āarrival timeā is greater than āavailableā, Mary must land at Smitts Field.
- If Mary lands at the Courtenay Airport, add (input) 20 min to ‘arrival time’.
- If Mary lands at Smitts Field, add (input) 45 min to ‘arrival time’.
- Find out (Input) available reservation times.Ā Store it in a variable called ‘res times’.
- Compare ‘arrival time’ with ‘res times’.
- Output optimal reservation time.
Solution (Flow Chart)
Leave a Reply