Solution (in English)Ā
- Find out how long the trip will take from take off to landing. Store it in a variable called ātripLengthāĀ
- Find out when Mary and Louise are able to leave. Store it in a variable called āleaveTimeāĀ
- Calculate leaveTime plus tripLength. Store it in a variable called āminTimeā
- Find out the available landing times. Store it in a variable called āavailableTimesāĀ
- Compare minTime to each availableTimeĀ
- If availableTime is earlier than minTime, move to the next availableTimeĀ
- if availableTime is equal to or later than minTime, book this time
Solution (flowchart)