Program in C to calculate the area and perimeter of rectangle


#include<stdio.h>
#include<conio.h>

void main()
{
            float a,b,l,p;
clrscr();
printf(“enter the l and b value:\n”);
scanf(“%f%f”,&l,&b);
a=l*b;
p=2*(l+b);
printf(“area=%f\n perimeter=%f\n”,a,p);
getch();
}


Post a Comment