Area of square:-

The area of a square is the measure of the space or surface occupied by it. It is equal to the product of the length of its two sides. Since the area of a square is the product of its two sides, the unit of the area is given in square units.

Observe the green square shown below. It has occupied 25 squares. Therefore, the area of the square is 25 square units. From the figure, we can observe that the length of each side is 5 units. Therefore, the area of the square is the product of its sides. Area of square = side × side = 5 × 5 = 25 square units.

example:-

N=5

area=N*N=5*5=25

 #include<stdio.h>

 int main() {
   int side, area;
 
   printf("\nEnter the Length of Side : ");
   scanf("%d", &side);
 
   area = side * side;
   printf("\nArea of Square : %d", area);
 
   return (0);
}
output:-
Enter the Length of Side : 5
Area of Square : 25

Post a Comment

If you have any doubts, Please let me know
Thanks!

Previous Post Next Post