Showing posts with label Basics. Show all posts
Showing posts with label Basics. Show all posts

C program to find the area of a square.

 

#include<stdio.h>
void main()
{
   float side;
    
   printf("Enter length of a side:");
   scanf("%f",&side);
    
   printf("Area of Square is: %.2f", side*side);
}


Output of the Program:

Enter length of a side:5
Area of Square is: 25.00