c program to Calculate Area & Perimeter of Square,
c program to Calculate Area & Perimeter of
Rectangle,
c program to Calculate Area & Perimeter of circle,
c program to Calculate Area & Perimeter of Triangle
#include
#include
void main()
{
int side,length,width;
clrscr();
printf("Enter the side of a Square=");
scanf("%d",&side);
printf("\n************** Result ******************\n");
printf("\nArea of a square is=%d", side*side);
printf("\n\nPerimeter of a square=%d",side*4);
printf("\n\n\n\nEnter the length of a Rectangle=");
scanf("%d",&length);
printf("\n Enter the width of a Rectangle=");
scanf("%d",&width);
printf("\n************** Result ******************");
printf("\n\nArea of a rectangle is=%d", length*width);
printf("\n\nPerimeter of a rectangle=%d",((2*length)+(2*width)));
getch();
}