write a program in c language to find the area and perimeter of a rectangle
Answers
Answered by
11
Answer:
To find the area of rectangle we multiply it's Length and Width. To find the perimeter of a rectangle, we should add the length of all four sides of rectangle. As opposite sides of a rectangle are equal we can calculate perimeter of rectangle as follows: Perimeter of Rectangle = 2 X (L + W)
Explanation:
Answered by
4
Answer:
#include <stdio.h>
int main()
{
float area,b,l,peri;
printf("enter the length and breadth");
scanf("%f%f",&l,&b);
area=l*b;
peri=2*(l+b);
printf("the area is=%f",area);
printf("the perimeter is=%f",peri);
return 0;
}
output:
enter the length and breadth 5 6
the area is= 30.00000
the perimeter is=22.00000
Similar questions