Riya (Algorithm and Flowchart)
Riya (Algorithm and Flowchart)
A
MS
I H
T RT S
OR A
G C H
L
A OW
F L
NAME:RIYA GULIA
CLASS:X ,A
SUBJECT:COMPUTER
SCHOOL:JBPS
ALGORITHMS AND FLOWCHARTS
A Flowchart
shows logic of an algorithm
emphasizes individual steps and their
interconnections
e.g. control flow from one action to the next
FLOWCHART SYMBOLS
START
Step 1: Input
START
M1,M2,M3,M4
Input
Input
M1,M2,M3,
M1,M2,M3,
Step 2: GRADE
M4
(M1+M2+M3+M4)/
GRADE(M1+M2+M3+M
GRADE(M1+M2+M3+M
4
4)/4
4)/4
Step 3: if (GRADE
N IS
IS Y
Y <50) then
GRADE<
GRADE<
50
50 Print “FAIL”
PRINT PRINT else
“PASS” “FAIL”
Print “PASS”
endif
STOP
EXAMPLE 2
Write an algorithm and draw a flowchart
to convert the length in feet to
centimeter.
Pseudocode:
Input the length in feet (Lft)
Calculate the length in cm (Lcm) by
multiplying LFT with 30
Print length in cm (LCM)
EXAMPLE 2
FLOWCHART
Algorithm
Step 1: Input Lft START
Step 2: Lcm
Input
Lft x 30 Lft
Step 3: Print
Lcm Lcm Lft x
30
Print
Lcm
STOP
EXAMPLE 3
START
Algorithm Input
W, L
Step 1: Input W,L
Step 2: AL x W
A LxW
Step 3: Print A
Print
A
STOP
EXAMPLE 4
START
Algorithm:
Input
Step 1: Input a, b, c a, b, c
STOP
RELATIONAL OPERATORS
Relational Operators
Operator
Description
>
Greater than
<
Less than
=
Equal to
Greater than
THANK
YOU