Code for Program to find the area of square in C Programming
#include<stdio.h>
void main()
{
float number1,number2;
printf("The length is : ");
if(scanf("%f",&number1)==1)
{
number2=number1*number1;
printf("The area of square is => %f",number2);
}
else
{
printf("error,enter correct value");
}
}
====================================OUTPUT======================================
The length is :2.3
The area of square is => 5.290000
The length is :3.378
The area of square is 11.410884