It is defined as a step-by-step procedure for solving a particular problem.
Examples are sorting algorithms, searching algorithm, trapezoidal rule algorithm, Newton’s algorithms etc. Algorithms do not involved making use of any diagram.
Example: Write an algorithm to get the base, width and height of a triangle and compute the area. Display the result of the area computed.
- Start the program
- Get the base, height
- Computer the area using area = 1/2 (Base * height )
- Output the area
- Stop the program