C Program to calculate the area of a square

Defination:
  1. A plane rectangle with four equal sides  and four right angles.
  2. A four sided rectangular polygon.
  3. You can compute the area of a square if you know the length of its sides.
Program:
#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


Posted on by