234k views
3 votes
What an algorithm to calculate area of squre.​

User Fryer
by
8.3k points

2 Answers

4 votes
The formula for calculating the surface area of a square is A = L x W
Area = Length x Width

The formula for Perimeter is P = 2L + 2W
Which simply means add all the sides
(Perimeter = 2 Length + 2 Width

These formulas only work for 2d shapes not 3d.

To calculate Volume of a cube its
V= L x W x H
Volume= Length x Width x Height

Hope this helps
User Pawan Singh
by
8.7k points
5 votes

algorithm to calculate area of the square

input x.

sq=x*x.

print sq.

User Robbymurphy
by
8.7k points

Related questions

1 answer
1 vote
7.2k views
asked Feb 23, 2024 216k views
Amaurremi asked Feb 23, 2024
by Amaurremi
7.3k points
1 answer
1 vote
216k views
2 answers
2 votes
188k views