/*Program
to find area and perimeter of rectangle*/
#include<conio.h>
#include<stdio.h>
void
main()
{
float l,b,area,peri;
clrscr();
printf("enter length and breath of
ractangle:");
scanf("%f%f",&l,&b);
area=l*b;
peri=2*(l+b);
printf("area=%fm*m\ nperimeter=%fm
",area,peri);
getch();
}
Output
:enter length and breath of ractangle:2
4
Area=8m*m
Parimeter=12m
No comments:
Post a Comment