Math, asked by lakshiyar19, 19 hours ago

Write an algorithm to input a side of a square and calculate its area and perimeter​

Answers

Answered by abrolsukhmanjotkaur
23

Answer:

◼️Hii there ◼️

Step-by-step explanation:

1️⃣What is the algorithm to find the perimeter of a square?

all sides of a square are equal, we only need one side to find its perimeter. The perimeter of the given square is: a + a + a + a = 4 a units. Hence, the formula of the perimeter of a square = 4 × (length of any one side).

2️⃣What is an algorithm and program that will calculate the area of a square?

In order to calculate area of a square, 'A' be the area of square and the length of the square be 'a'. Then we need to calculate A= a*a. Step 2 :- Accept as input, the length of the sides of the square, and store the value in variable a. Step 3 :- Calculate the area of the square (a*a) and store in a variable A.

⭐⭐⭐⭐⭐

Answered by bhairocking507
1

Answer:

Answer mentioned in attachment.

Attachments:
Similar questions