Post date: Oct 21, 2013 5:51:23 AM
Definitions
There are various definitions available for term Algorithm as:
Any of the above mentioned definition will work, and even all definitions provides a similar summary i.e. a set of well defined steps to solve a defined problem corresponding to provided inputs.
Five characteristics of an Algorithm are:
One important point about algorithm, it is not a computer program. Instead it is a procedure written as pseudo code or English language type description, providing information about what calculations are to be performed and in which flow.
For Example : To add two numbers we can have an algorithm like:
English language Type
1. Ask user to enter two integer numbers.
2. Add both the integer numbers.
3. Print the final sum value of two numbers
OR
Pseudo Code Type
Algorithm SUM
Input: Two Integer Numbers as ONE, TWO
Output: sum of ONE & TWO as RESULT
ONE <- User input required
TWO <- User input required
RESULT <- ONE + TWO
return RESULT
OR
Flowchart Representation
In case you want to show it visually it can be represented as:
Even for some cases all the three types of defining the algorithm is used. I depends on what kind of document you are working on.