C Program to find area of Square

Get side of square and find area of square

Sample Input 1:


Sample Output 1:


Program or Solution


int main()

	int side,area;
	printf("Enter a side of square:");

	area=side * side;
	printf("\nArea of Square: %d",area);
	return 0;


Program Explanation

Get side of a square (using scanf statement)

Calculate area by multiplying side and side(area = side * side) print area(using printf statement)