The following is an algorithm for making a cup of tea.
- Put the teabag in a cup.
- Fill the kettle with water.
- Boil the water in the kettle.
- Pour some of the boiled water into the cup.
- Add milk to the cup.
- Add sugar to the cup.
- Stir the tea.
- Drink the tea.
As you can see, there are certain steps that must be followed. These steps are in a specific order, even though some of the steps could be rearranged. For example, steps 5 and 6 can be reversed. You could add the sugar first, and the milk afterwards.
Please keep in mind that the order of some steps can probably be changed but you can’t move them far away from where they should be. For example, you can’t move step 3 (“Boil the water in the kettle.”) to the end of the algorithm, because you will end up drinking a cup of iced tea (and not a warm one) which is totally different from your initial goal!
This article is taken from a book of mine. If you enjoyed it, please visit my author's page inand check out all of my books!