Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<conio.h>
- void main()
- {
- int side, peri_s, area_s,len, bre, peri_r, area_r;
- clrscr();
- printf("Enter length of a side of square :");
- scanf("%d",&side);
- area_s=side*side;
- peri_s=4*side;
- printf("Area of square = %d\tPerimeter of square=%d",area_s,peri_s);
- printf("\n\nEnter length and breadth of the rectangle :");
- scanf("%d%d",&len,&bre);
- area_r=len*bre;
- peri_r=(2*len)+(2*bre);
- printf("Area of rectangle = %d\tPerimeter of rectangle=%d",area_r,peri_r);
- getch();
- }
Add Comment
Please, Sign In to add comment