Algorithm Programming
Q=Write an algorithm to display area and
perimeter of a square?
Step 1: Start
Step 2: Initialize the variables SIDE (S), SIDE (S) and AREA (A)
as integers.
Step 3: Input the variable SIDE (S) and SIDE (S).
Step 4: Compute the AREA (A) as A = S x S.
Step 5: Print the area as AREA (A).
Step 6: Compute perimeter (P) as P = 4 x A
Step 7: Print the perimeter as (P)
Step 8: Stop