Algorithm and Flowchart
What is an Algorithm?
An algorithm is a step-by-step procedure or set of instructions to solve a specific problem or perform a task.
Features of an Algorithm:
- Clear and simple steps
- Has a starting and ending point
- Solves a particular problem
What is a Flowchart?
A flowchart is a diagrammatic representation of an algorithm. It uses symbols like rectangles, ovals, and
diamonds to show the flow of steps.
Common Flowchart Symbols:
- Terminal: Start/End of the process
- Process: Task or instruction
- Decision: A yes/no or true/false question
- Arrow: Shows the flow of steps
Example: Add Two Numbers
Algorithm:
1. Start
2. Input number A
3. Input number B
4. Add A and B -> Store result in C
5. Display C
6. Stop
Flowchart:
Algorithm and Flowchart
Start
Input A
Input B
C=A+B
Display C
Stop