DEC2012
Fundamental
Programming
Algorithm,
Flowchart and
Pseudocode
Page 1
2.1 Know the algorithm,
flowchart and Pseudocode
• Define the algorithm
• Identify the flowchart
• Identify the pseudocode
Page 2
Problem Analysis and Design
Know the..
Design Tools
Flowchart
Algorithm
Pseudocode
Page 3
Problem Analysis and Design
What is Algorithm?
1 Algorithm
A specific set of instructions for carrying out
a procedure or solving a problem.
Usually with the requirement that the
procedure terminate at some point.
Specific algorithms sometimes also go by the
name method, procedure, or technique.
Page 4
Problem Analysis and Design
Cont..
1 Algorithm
Step by step procedure designed to perform
an operation, and which (like a map or
flowchart) will lead to the sought result if
followed correctly.
Algorithms have a definite beginning and a
definite end, and a finite number of steps.
Page 5
Problem Analysis and Design
Example of Algorithm
A Write an algorithm to add two numbers entered by user.
Page 6
Problem Analysis and Design
Example of Algorithm
Write an algorithm to find the largest among three different
B numbers entered by user.
Page 7
Problem Analysis and Design
Remember !!!
“Algorithm is not the computer code.
Algorithm are just the instructions which gives
clear idea to you idea to write the computer code”
Page 8
Problem Analysis and Design
What is Pseudocode?
2 Pseudocode
q Pseudo code is an abbreviated version of
actual computer code.
q When the pseudo code is completed it can
be easily translated into any computer
language.
Page 9
Problem Analysis and Design
Cont..
2 Pseudocode
q Artificial and informal language
q Helps programmer to plan algorithm
q Not an actual programming language
q Each line of code represent a step/process.
Page 10
Problem Analysis and Design
Example of Pseudocode
The pseudo code below is to find the volume of a box if the
A length, width and height are given. Write the program based
on the pseudo code below..
START
INPUT length of the box
INPUT width of the box
INPUT height of the box
Volume = Length x Width x Height
DISPLAY volume of the box
END
Page 11
Problem Analysis and Design
Pseudocode à Program
Page 12
Problem Analysis and Design
What is Flowchart?
3 Flowchart
Graphic representation of algorithm is
known as flowchart which consists of geometric
symbols.
The symbols are connected by line of arrows
called flow lines.
Page 13
Problem Analysis and Design
Cont..
3 Flowchart
The shape of the symbol indicates the type of
operation that is to occur.
Flow from the top of the page to the bottom.
Page 14
THE END
Page 15