0% found this document useful (0 votes)
19 views

L2 - Flow Chart & Algorithm

Uploaded by

mananbaluja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

L2 - Flow Chart & Algorithm

Uploaded by

mananbaluja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Introduction to Flowchart &

Algorithm
Key features of flow charts
 It is a diagrammatic representation of computation.

 It is also defined as a visual or graphical representation of


computation.

 Using flowcharts it is easy to understand and analyze the problem.

 It is an useful aid for programmers and system analysts.

 It is machine independent. They can be used for any type of logic.

 RAPTOR tool is used for creating flowcharts.

2
Basic Flowchart Symbols – contd..

Connector Symbol
Indicates that the flow continues where a matching
symbol (containing the same letter) has been placed.

Subroutine Symbol
Indicates a sequence of actions that perform a specific task
embedded within a larger process. This sequence of actions
could be described in more detail on a separate flowchart.

3
Representation of computation

 Flow chart and algorithm are used to represent


any computational problem.
– Flowchart: It is a graphical/pictorial
representation of computation

– Algorithm: Series of steps to solve a Problem


and use English like statements

4
Basic Flowchart Symbols

5
Basic Flowchart

6
Algorithm and Flowchart for area of the circle

Name of the algorithm : Compute the area of a circle

Step1: [Input the value for radius]


Input radius

Step 2: [Compute the area]


Area  3.1416 * radius * radius

Step 3: [Print the Area]


Print ‘Area of a circle =‘, Area

Step 4: [End of algorithm]


Stop

AreaC 7
Algorithm for SI and CI
Name of the algorithm: Calculate SI and CI

Step1: [ Read the values of P, T and R]


Input P,R,T

Step 2: [Compute the simple interest]


SI  ( P*R*T)/100

Step 3: [Compute the compound interest]


CI  P*(1+ R/100)T -P

Step 4: [Print the simple and compound interest]


Print ‘Simple Interest=‘,SI
Print ‘Compound Interest=‘,CI

Step 5: [End of Algorithm]


Stop
8
Flowchart for SI and CI

9
To convert Celsius to Fahrenheit & vice versa

10
Flowchart for arithmetic operations

11
Largest of 3 Numbers contd.

12
Check whether the given no. is even or odd

13
Flowchart to find factorial of given no

14
Flowchart to find sum of natural numbers

15
Flowchart to find sum of digits of a given no

16
Largest among n numbers

17
Summary

 Introduction to Flowcharts .

 Introduction to Algorithms.

18

You might also like