What is an Algorithm
What is an Algorithm
An algorithm as a set or list of instructions for carrying out some process step by step.
Example of Algorithm
1. Start.
4. Output the value of the variable (result), which represents the sum of the input numbers.
5. End.
Algorithm
An algorithm represents the thinking process for solving a problem in an abstract yet precise way, rather than the
answer itself.
Pseudocode Example:
BEGIN
OUTPUT("Input number1:")
INPUT s1
OUTPUT("Input number2:")
INPUT s2
sum=s1+s2
OUTPUT sum
END
FLOW CHART
Flow chart is a type of diagram that represents an algorithm, workflow or process. The flowchart shows the
steps as boxes of various kinds, and their order by connecting the boxes with arrows.
Input/Output: A parallelogram denotes any function of input/output type. Program instructions that take input
from input devices and display output on output devices are indicated with parallelogram in a flowchart.
Processing: A box represents arithmetic instructions. All arithmetic processes such as adding, subtracting,
multiplication and division are indicated by action or process symbol.
Decision: Diamond symbol represents a decision point. Decision based operations such as yes/no question or
true/false are indicated by diamond in flowchart.
Connectors: Whenever flowchart becomes complex or it spreads over more than one page, it is useful to use
connectors to avoid any confusions. It is represented by a circle.
Flow lines: Flow lines indicate the exact sequence in which instructions are executed. Arrows represent the
direction of flow of control and relationship among different symbols of flowchart.
EXAMPLE OF FLOWCHART
"Programming is the art of telling another human what one wants the computer to do."
- Donald Knuth
“The beginning of wisdom is this: Get wisdom. Though it cost all you have, get understanding."
-Proverbs 4:7