Monday, August 22, 2016

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


No comments:

Post a Comment