Here is a simple program to find the area of the rectangle and square. Also the below program will find the perimeter of the rectangle.
Program#include<stdio.h>
#include<conio.h>
void main()
{
int l,,area,peri,sqr,side;
clrscr();
printf("\nEnter the length, width of rectangle & side of Square");
scanf("%d%d%d",&l,&b,&side);
area=l*b;
peri=2*l+2*b;
sqr=4*sqr;
printf("\nArea of Rectangle=%d",area);
printf("\n Perimeter=%d",peri);
printf("\nSquare=%d",sqr);
getch();
}
Output:
Enter the length, width of rectangle & side of Square
3
5
6
Area of rectangle=15
Perimeter=16
Square=24
Pankaj Gaikar is a
professional blogger
from Pune, India who writes on Technology, Android,
Gadgets, social media and latest tech updates at
Punk Tech
,
Being Android
&
Shake The Tech
. Email me
HERE
0 comments :
Post a Comment