Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

ALGORITHM

To solve any problem on a computer, we need to


analyse and understand the nature of the problem.
We plan the input and apply the required methods
step by step to get the desired result. This step by
step procedure to solve any logical and
mathematical problem is called Algorithm.

 RULES FOR WRITING AN ALGORITHM


o An algorithm should be written in English like
language.
o It should be written in a simple and precise
manner so that everyone can understand it.
o An input is required to write an algorithm.
o Each step should be written in a sequential
manner.
o One can include variables and define
mathematical expressions to calculate the
result.
o Statement that are of similar type should be
combined to avoid a lengthy code.
o Each instruction should be executed within a
reasonable time frame.
o To ensure that an algorithm produces the
expected output, it should be checked using
sample values.
 CHARACTERISTICS OF AN
ALGORITHM
A good algorithm should possess the following
features:

 INPUT
An algorithm accepts an input.

 GENERALITY
An algorithm work on a set of input.

 DEFINITENESS
Each instruction should be written in a simple and
precise manner so that everyone can understand.

 UNIQUENESS
Each step in an algorithm should be uniquely
identified and an output of each step should
depend on the previous step.

You might also like