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)