Input the Side and Calculate Area of Square C Program

How to write a c program to input the side and calculate area of square in c programming ?


Solution:
//Program to input the side and calculate area of square.
#include<stdio.h>
#include<conio.h>

void main()
{
float side;

clrscr();

printf("Enter side of the square: ");
scanf("%f", &side);
printf("The area of square of side %f is: %f", side, side*side);

getch();
}


Learn More :