In this program, we are going to share how to calculate the area of a square using C programming language. If you are a beginner and want to start learning the C programming, then keep your close attention in this tutorial as I am going to share a C program to calculate the area of a square with the output.
Copy the below C program and execute it with the help of Turbo C compiler. At the end of this program, We have shared the output of this program.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #include<stdio.h> int main() { int side, area; printf("\nPlease enter the length of side : "); scanf("%d", &side); area = side * side; printf("\nThe area of square : %d", area); return (0); } |
Please enter the length of side : 12
The area of square : 144
Liked this program? Do Like & share with your friends.
If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.
Article Tags: Area Of Square Example C Program, C Program to Find Area of a Square, c program to find area of square using function, c program to find perimeter of square, c programs, c programs with output, c programs with solutions, list of important c programs