Flowchart
- A flowchart is a pictorial representation of an algorithm.
- A flowchart is a diagram made up of boxes, diamonds and other shapes, connected by arrows.
- Each shape represents a step of the solution process and the arrow represents the order or link among the steps.
- Symbols used in a flowchart and their purpose:
Example: Flowchart to find largest of 2 numbers
Pseudocode
- Algorithms can also be represented as pseudocodes.
- It is considered as a non-formal language that helps programmers to write algorithms.
- It is intended for human reading and cannot be executed directly by the computer.
- Frequently used keywords while writing pseudocode:
-
- INPUT
- COMPUTE
- INCREMENT
- DECREMENT
- IF/ELSE
- WHILE
- TRUE/FALSE
Benefits of Pseudocode:
- Improves readability of the algorithm.
-
It can be used as a rough documentation for
increased program understandability
of programs by different programmers.
Example: Pseudocode to find largest of 2 numbers