Problem 4: Book a dinner reservation
Solution(in English)
- Find out their time of landing. Store it as variable called “landing time“.
- Find out their place of landing and then store it as variable called “landing spot.”
- If they land in Courtenay, then add 20 minutes in their landing time and store it as “reservation time.” Then book a taxi.
- If they land in Smiths field , then add 45 minutes to their landing time and store it as “reservation time.” Then book a loaner car.
- Find out the time that they have to book for reservation in Atlas Cafe and store it as “available reservation time.”
- Compare available reservation time with each reservation time.
- If the available reservation time is earlier to reservation time, then move to next available reservation time.
- If available reservation time is equal to or later than the reservation time, then book this time.
Solution(in Flowchart)

Leave a Reply