Algorithms

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.

Solution

  1. Start the program
  2. Get the base, height
  3. Computer the  area using area = 1/2  (Base * height )
  4. Output the area
  5. Stop the program

Leave a Comment

not allowed!