Algorithm and
Flowchart.
Hello world!
I AM SHIVAM SHARMA
I am here to speak on
Algorithms and
Flowcharts.
Roll no.- BWU/BTS/20/122
2
1
Algorithms
Let’s start with the
first set of slides
3
It is a step by step method of solving a problem. It
can be also defined as a process or set of rules to
be followed in calculations or other problem-solving
operations, especially by a computer.
4
Algorithm
Precision – the steps are precisely stated (defined).
Uniqueness – results of each step are uniquely defined and
only depend on the input and the result of
the preceding steps.
Finiteness – the algorithm stops after a finite number of
instructions are executed.
Input – the algorithm receives input.
Output – the algorithm produces output.
Generality – the algorithm applies to a set of inputs.
5
Characteristics of algorithm:
2
Flowchart
6
A flowchart is a graphical representation of an algorithm.
These flowcharts play a vital role in the programming of a
problem and are quite helpful in understanding the logic
of complicated and lengthy problems. Once the flowchart is
drawn, it becomes easy to write the program in any high
level language. Often we see how flowcharts are helpful in
explaining the program to others. Hence, it is correct to
say that a flowchart is a must for the better
documentation of a complex program.
7
Flowchart
The Standard symbols through which flowcharts are
given below:-
8
The following are some guidelines in flowcharting:
1. In drawing a proper flowchart,
all necessary requirements
should be listed out in logical
order.
2. The flowchart should be clear,
neat and easy to follow. There
should not be any room for
ambiguity in understanding the
flowchart.
3. The usual direction of the flow
of a procedure or system is
from left to right or top to
bottom.
4. Only one flow line should come
out from a process symbol.
9
last
last
or
5. Only one flow line should enter
a decision symbol, but two or
three flow lines, one for each
possible answer, should leave the
decision symbol.
6. Only one flow line is used in
conjunction with terminal symbol.
7. If the flowchart becomes
complex, it is better to use
connector symbols to reduce the
number of flowlines. Avoid the
intersection of flow lines if you
want to make it more effective and
better way of communication.
8. Ensure that the flowchart has a
logical start and finish.
9. It is useful to test the
validity of the flowchart by
passing through it with a simple
test data.
Example: Write an algorithm and draw the flowchart for
finding the average of two numbers
Algorithm: Flowchart :⤓
Input: two numbers x and y
Output: the average of x and y
Steps:
1. input x
2. input y
3. sum = x + y
4. average = sum /2
5. output average
Thank you
The End
12

Algorithm and flowchart

  • 1.
  • 2.
    Hello world! I AMSHIVAM SHARMA I am here to speak on Algorithms and Flowcharts. Roll no.- BWU/BTS/20/122 2
  • 3.
    1 Algorithms Let’s start withthe first set of slides 3
  • 4.
    It is astep by step method of solving a problem. It can be also defined as a process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer. 4 Algorithm
  • 5.
    Precision – thesteps are precisely stated (defined). Uniqueness – results of each step are uniquely defined and only depend on the input and the result of the preceding steps. Finiteness – the algorithm stops after a finite number of instructions are executed. Input – the algorithm receives input. Output – the algorithm produces output. Generality – the algorithm applies to a set of inputs. 5 Characteristics of algorithm:
  • 6.
  • 7.
    A flowchart isa graphical representation of an algorithm. These flowcharts play a vital role in the programming of a problem and are quite helpful in understanding the logic of complicated and lengthy problems. Once the flowchart is drawn, it becomes easy to write the program in any high level language. Often we see how flowcharts are helpful in explaining the program to others. Hence, it is correct to say that a flowchart is a must for the better documentation of a complex program. 7 Flowchart
  • 8.
    The Standard symbolsthrough which flowcharts are given below:- 8
  • 9.
    The following aresome guidelines in flowcharting: 1. In drawing a proper flowchart, all necessary requirements should be listed out in logical order. 2. The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity in understanding the flowchart. 3. The usual direction of the flow of a procedure or system is from left to right or top to bottom. 4. Only one flow line should come out from a process symbol. 9 last last or
  • 10.
    5. Only oneflow line should enter a decision symbol, but two or three flow lines, one for each possible answer, should leave the decision symbol. 6. Only one flow line is used in conjunction with terminal symbol. 7. If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flowlines. Avoid the intersection of flow lines if you want to make it more effective and better way of communication. 8. Ensure that the flowchart has a logical start and finish. 9. It is useful to test the validity of the flowchart by passing through it with a simple test data.
  • 11.
    Example: Write analgorithm and draw the flowchart for finding the average of two numbers Algorithm: Flowchart :⤓ Input: two numbers x and y Output: the average of x and y Steps: 1. input x 2. input y 3. sum = x + y 4. average = sum /2 5. output average
  • 12.