0% found this document useful (0 votes)
19 views1 page

Square Area and Perimeter Algorithm

The document outlines an algorithm for calculating the area and perimeter of a square. It includes steps for initializing variables, inputting the side length, computing the area and perimeter, and printing the results. The algorithm concludes with a stop command.

Uploaded by

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

Square Area and Perimeter Algorithm

The document outlines an algorithm for calculating the area and perimeter of a square. It includes steps for initializing variables, inputting the side length, computing the area and perimeter, and printing the results. The algorithm concludes with a stop command.

Uploaded by

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

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

You might also like