Professional Documents
Culture Documents
Algorithm and Flowchart
Algorithm and Flowchart
Algorithm and Flowchart
Flow chart :
START
READ A,B
SUM = A+B
PRINT SUM
STOP
02. Find greatest of two numbers
Algorithm :
Flowchart :
START
READ A,B
IF A>B
YES
DISPLAY A IS GREATER
NO
DISPLAY B IS GREATER
STOP
03. To check whether the given number is even or odd
Algorithm :
Step : 3 : Process A % 2
Flowchart :
START
GET A
NO IF A%2 YES
(==0)
A IS ODD A IS EVEN
STOP
04. To check whether the given year is a leap year
Algorithm :
Step : 4 : Display a is a leap year if a%4 is true , else A is not a leap year
Flowchart :
START
GET A
YES IF A%4(==0) NO
STOP
05. To check the greatest of three numbers
Algorithm :
(i) Check the condition (A>B) and (A>C) if yes display A is greater
(ii) Check the condition (B>A) and (B>C) if yes display B is greater
(iii) Else display C is greater
Flowchart : START
READ A,B,C
DISPLAY A IS >
DISPLAY B IS >
NO
DISPLAY C IS >
STOP