Program
#include<stdio.h>
int main()
{
int l,b,a,p;
printf("****************************************************");
printf("\n****************************************************");
printf("\n** WAP to find area and perimeter of a rectangle **");
printf("\n** Created by Sheetal Garg **");
printf("\n** Assistant Professor **");
printf("\n** Phone No:9467863365 **");
printf("\n****************************************************");
printf("\n****************************************************");
printf("\nenter the length of rectangle \n ");
scanf("%d",&l);
printf("enter the breadth of rectangle \n ");
scanf("%d",&b);
a = l*b;
printf("the area of rectangle is %d \n",a);
p = 2*(l+b);
printf("the perimeter of rectangle is %d",p);
return 0;
}
Output
**************************************************** **************************************************** ** WAP to find area and perimeter of a rectangle ** ** Created by Sheetal Garg ** ** Assistant Professor ** ** Phone No:9467863365 ** **************************************************** **************************************************** enter the length of rectangle 5 enter the breadth of rectangle 6 the area of rectangle is 30 the perimeter of rectangle is 22