C Program for Beginners : Area of Square
Program :
Shape : Square
Formula : side * side |
Definition :
|
#include<stdio.h> #include<conio.h> void main() { int side,area; clrscr(); // Clear Screen printf("nEnter the Length of Side : "); scanf("%d",&side); area = side * side ; printf("nArea of Square : %d",area); getch(); }Output :
Enter the Length of Side : 5 Area of Square : 25
No comments:
Post a Comment