Chapter 11
Chapter 11
Algorithm in Programming
What is Algorithm
• Definition:
Write an algorithm for making a cup of tea. Before you start, you need to understand
the steps and identify what you need (input), what you will do (process), and what
you get in the end (output).
• Algorithm Steps:
• Start
• Boil water
• Add tea leaves or tea bag to a cup
• Pour hot water into the cup
• Add sugar and milk if needed
• Stir the tea
• Serve the tea
• End
Input-Process-Output Table