0% found this document useful (0 votes)
23 views17 pages

PCI Unit 1.4 Flowchart 1

Uploaded by

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

PCI Unit 1.4 Flowchart 1

Uploaded by

Mayur Patil
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

K. K.

Wagh Polytechnic, Nashik

Unit-1:Program Logic Development

Topic: Flowchart (Part-1)

Unit-I Program Logic Development


Flowchart
Definition: Flowchart is a pictorial or diagrammatic
representation of logical sequence of well-defined instructions to
solve a problem.
•This diagrammatic representation illustrates a solution
model to a given problem
•The flowchart shows the steps as boxes / symbols of
various kinds
•The boxes /symbols are connected with arrows.
•It shows the flow of operations from start to end to solve the
given problem
•It is also an algorithm represented in diagram form

Unit-I Program Logic Development


Symbols of Flowchart
Symbol Function Description

Doughnut/oval symbol is used


1 Terminal for start & Stop steps

Parallelogram symbol used for


2 Input-Output input-output operations

Rectangle is used for


Processing
3 calculations, assignments,
Assignment
declarations etc. operations
Declaration

Diamond is used to take decision


having one input & two outgoing
4 Decision Making
paths (Yes, No)

Unit-I Program Logic Development


Symbols of Flowchart
Symbol Function Description

Arrows are used to connect various


5 Flow Lines symbols to indicate flow of
operations

Circle is used to connect two parts


Connector
Symbols ofof flowchart on two pages
6 (continuation)

Double line rectangle is used to


Function
7 represent function call or
/Subroutine
subroutine

8 Hexagon shape is used for


Loop
indicating a loop operation

Unit-I Program Logic Development


Flowchart

Initial value

condition

Repetitive
Task

Updation

Unit-I Program Logic Development


Flowchart
Draw a flowchart to find the sum of two numbers
Start
Algorithm:
Accept no1 &
Step-1: Start no2
Step-2: Accept two numbers as no1
& no2 Find sum=no1 + no2

Step-3: Find sum = no1 + no2


Display sum
Step-4: Display sum
Step-5:Stop
Stop

Unit-I Program Logic Development


Flowchart
Draw a flowchart to find the area &
perimeter of Rectangle Start

Algorithm: Accept
Step-1: Start length & breadth

Step-2: Accept length & breadth of rectangle


Step-3: Find Area= length * breadth Find Area=length * breadth
perimeter=2*(length + breadth)
Step-4: Find Perimeter = 2 * (length +
breadth)
Step-5: Print Area Display Area
Display perimeter
Step-6: Display Perimeter
Step-7:Stop
Stop
Unit-I Program Logic Development
Flowchart
Draw a flowchart to find the area & perimeter of Rectangle

Start A

Accept
length & breadth
Display Area

Display
Find Area=length * breadth
perimeter
Find
perimeter=2*(length + Stop
breadth)

A
Unit-I Program Logic Development
Exercise
1. Draw a flowchart to find area and volume of a sphere
area = 4*Pi*r*r volume = (4/3)*(Pi*r*r*r)
2. Draw a flowchart to interchange contents of C and D variables
temp = C
C=D
D = temp
3. Draw a flowchart to find area and circumference of a circle
Area = Pi *r * r, circumference = 2*pi*r
4. Draw a flowchart to calculate simple interest for the principle
amount deposited in a bank for n-No. of years with specified rate of
interest.
SI = (P * N * R ) / 100

Unit-I Program Logic Development


Exercise
Practical No.3
1. Draw a flowchart to convert temperature from degree Fahrenheit to
degree centigrade
C = (F-32)/1.8

2. Draw a flowchart to convert distance from kilo meters to


miles and meters
miles = km * 0.6214
meters = km * 1000
3. Draw a flowchart to convert temperature from degree
centigrade to degree Kelvin
K = C + 273.16
Unit-I Program Logic Development
Flowchart
Draw a flowchart to convert temperature
from degree Fahrenheit to degree centigrade Start

Accept temp
Algorithm:
(F)
Step-1: Start
Step-2: Accept temp. in Fahrenheit (F) Find C= (F-32)/1.8
Step-3: Find C= (F-32)/1.8
Step-4: Display temp. in centigrade Display temp.
(C) (C)
Step-5:Stop
Stop

Unit-I Program Logic Development


Decision Making-Flowchart

Previous step

if (condition) False
?
True
True action False action

Next step

Unit-I Program Logic Development


Decision Making-Flowchart
1. Draw a flowchart to find greater number
from two numbers
Start

Algorithm: Accept no1 &


Step-1: Start no

Step-2: Read no1 & no2 as two if False


numbers (no1 >
Step-3: If (no1 > no2) no2)?
True
-then Print no1 as greater
Display no1 Display no2
-else Print no2 as greater as greater as greater
Step-4: Stop
Stop
Unit-I Program Logic Development
Exercise

1. Draw a flowchart to find smaller number from two


numbers
2. Draw a flowchart to find taller person out two
persons.

Unit-I Program Logic Development


Decision Making-Flowchart
2. Draw a flowchart to check whether give
number is even or odd ?
Start

Algorithm: Accept no
Step-1: Start
Step-2: Read a number (no) No
if
Step-3: If (no % 2 == 0) (no%2==0)?
-then Print no is even
Yes
-else Print no is odd Print no is Print no is
Step-4: Stop even odd

Stop
Unit-I Program Logic Development
Exercise

1. Draw a flowchart to check whether given year is


leap year?

Unit-I Program Logic Development


Flowchart

Thank
you
Have
a
Nice Day

You might also like