1. P R E P A R E D B Y :
R A V I B H A R A D V A 1 3 0 1 1 0 1 2 0 0 0 7
H E M D E E P B H A V S A R 1 3 0 1 1 0 1 2 0 0 0 8
N A Y A N C H A U H A N 1 3 0 1 1 0 1 2 0 0 0 9
C H I N T A N K A T H R E C H A 1 3 0 1 1 0 1 2 0 0 1 0
C H I T T K A K A D I A 1 3 0 1 1 0 1 2 0 0 1 1
Y A S H R A J C H U D A S A M A 1 3 0 1 1 0 1 2 0 0 1 2
F A C U L T Y
J . V S I R
Flowcharts and algorithms
2. What is algorithm?
An algorithm is the finite set of sequential
instructions to accomplish a task where instructions
are written in a simple English language.
It is called as a step by step solution of the program.
It is a well developed, organized approach to solving
complex problems.
It refers to logic of program.
It is step by step solution to given program.
3. Characteristics of algorithm
Algorithm has four characteristics:
Finiteness : Total number of steps used in
algorithm should be finite.
Definiteness : Each step of algorithm must be clear
and un ambiguous.
Effectiveness : Every step must be basic and
essential.
Input & output: the algorithm must accept zero or
more input and must produce at least one output.
4. How to develop an algorithm
First identify different inputs to be given to system.
Then identify what output you want from the
program.
Then create logic for it.
Break that logic into simple steps.
Write this steps in order.
This forms the algorithm required from the given
logic.
5. Advantages Disadvantages
Very easy to write.
Easy technique to
understand logic.
Easy identification of the
mistakes by non
computer person.
Time consuming.
Difficult to show
branching and looping.
Big tasks are difficult to
put in algorithm.
6. What is a flowchart?
It is a pictorial representation of the algorithm.
What we did in algorithm, we can represent it in
flowchart.
This format is easy to understand.
It shows us the flow of the instructions.
7. Symbols of flowchart
Name Symbol Use in flowchart
Oval Used at starting and at
ending of the program.
Flowlines Used to show direction of
the flow.
Parallelogram Used for input output
options.
Rectangle Denotes process to be
carried out.
8. round
Diamond It is used for showing
decision structure.
Round Connecting flow lines
from different places
Block Indicates block of
statements or body of
loop
Symbols of flowchart
9. Advantages Disadvantages
Easy to draw.
Easy technique to
understand logic.
Easy to identify the
mistake by non computer
person.
Easy for branching and
looping.
Time consuming.
Difficult for
modification.
Difficult task to draw
flow charts for big
programs.
10. Different operators used in programing
Determine how one value relates to another
Equal to ==
Not equal to !=
Less than <
Greater than >
Less than or Equal to <=
Greater than or Equal to >=
11. Example 1: write an algorithm and flowchart for
converting length in feet to centimeter.
Algorithm:
Step1: input l in ft
Step 2: L in cm= l in ft*30
Step 3: Print l in cm.
Flowchart:
in ft
L in cm= l in ft*3
start
Read value
of l
L in cm= l in ft*30
Print l in cm
stop
12. Example2: write an algorithm and flowchart to
read 2 sides of rectangle and calc. its area.
Algorithm:
Step1: read input W,L.
Step2: A=W*L
Step3: print A
Flowchart:
Read W,L
A=L*W
Print A
start
Read value
of W & L
A= L*W;A = L * W
Print area
A
stop