Algorithm and Flowchart Examples
1. Write algorithm and draw flowchart to “Buy a Pen”
Algorithm Flowchart
Step1. Start. Start
Step2. Go to stationary shop
Step3. Select a pen
Step4. Pay the price Go to stationary shop
Step5. Take the pen
Step6. Come back home
Step7. Stop Select a pen
Pay the price
Take the pen
Come back
home
Stop
2. Write algorithm and draw flowchart to “Add two Numbers”.
Algorithm Flowchart
Step1. Start. Start
Step2. Take the two numbers.
Step3. Add them.
Step4. Give the result. Take two
Step5. Stop numbers A and B
Find Sum A + B
Give the Result
Stop
3. Write algorithm and draw flowchart to “Find the Area of a Rectangle”
Algorithm Flowchart
Step1. Start. Start
Step2. Take the length (l) and breadth (b)
Step3. Find the Area as l x b
Step4. Give the result. Take the length (l)
Step5. Stop and breadth (b)
Find the Area as l x b
Give the Result
Stop
4. Write algorithm and draw flowchart to “Display your Age”
Algorithm Flowchart
Step1. Start. Start
Step2. Input your age
Step3. Display your age
Step4. Stop Input Age
Display Age
Result
Stop
5. Write algorithm and draw flowchart to “Find the Greater of two Numbers”
Algorithm Flowchart
Step1. Start.
Step2. Input the two numbers Start
A and B.
Step3. Check if A>B. If yes,
go to step 4 Input A and B
else go to step 6
Step4. Display the number A
Step5. Go to step 7 NO
Is
Display B
Step6. Display the number B A>B
Result
Step7. Stop
YES
Display A
Result
STOP
6. Write algorithm and draw flowchart to “Find the Square of a Number”
Algorithm Flowchart
Step1. Start. Start
Step2. Input the Number A
Step3. Let Square = A*A
Step4. Give the answer Input A
Step5. Stop
Square = A*A
Give Answer
Result
STOP
7. Write algorithm and draw flowchart to “Make Tea”
Algorithm Flowchart
Step1. Start. Start
Step2. Take water in pan
Step3. Boil the water
Step4. Add sugar and Tea leaves Take water in pan
Step5. Add milk
Step6. Boil it
Step7. Pour it into cup Boil water
Step8. Stop
Add Sugar and
Tea leaves
Add Milk
Boil water
Pour in cup
STOP