C Program to Calculate Area of Square
C Program for Beginners : Area of Square
Shape : Square
Formula : side * side |
Definition :
|
Program :
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#include<stdio.h> int main() { int side, area; printf("\nEnter the Length of Side : "); scanf("%d", &side); area = side * side; printf("\nArea of Square : %d", area); return (0); } |
Output :
1 2 |
Enter the Length of Side : 5 Area of Square : 25 |