Professional Documents
Culture Documents
START
Square= x*x
Print result
Stop
PRACTICAL NO.4
Q:- To write Algorithms & draw Flow Chart to check
for leap year.
ANS:- The algorithm for checking leap year is:-
Step 1:- START
Step 2:- Read the year
Step 3:- Divide the year by 4
Step 4:- If it is divisible, then it’s a leap year
Step 5:- If it is not divisible, then it is not a leap year
Step 6:- Print the result
Step 7:- STOP
Flowchart for checking of leap year
START
STOP
PRACTICAL NO. 5
Q:- To write Algorithms & draw Flow Chart to
Calculate Area and Perimeter of Rectangle.
ANS:- Algorithm for calculating perimeter of a
rectangle:-
o Step 1:- START
o Step 2:- Read the length and breadth of the
rectangle
o Step 3:- Perimeter:- 2*(length + breadth)
o Step 4:- Show the result
o Step 5:- STOP
Flowchart for perimeter of rectangle
START
Perimeter of rectangle:-
2*(length + breadth)
STOP
Algorithm for calculating the area of a rectangle
Step 1:- START
Step 2:- Read length and breadth
Step 3:- Area of rectangle:- length * breadth
Step 4:- Show result
Step 5:- STOP
Flowchart for calculating the area of a rectangle:-
START
Read length
and breadth
Area of rectangle :-
Length * Breadth
Show results
STOP