//Program to calculate Area and Perimeter of Rectangle.
#include<stdio.h>
#include<conio.h>
void main()
{
float l,b,area,per;
clrscr();
printf("\n Enter the length and breadth of the rectangle \n");
scanf("%f%f",&l,&b);
area=l*b;
per=2*(l+b);
printf("\n The area and perimeter of rectangle with l=%.2f and b=%.2f is \n %.2f and %.2f",l,b,area,per);
getch();
}
0 comments:
Post a Comment