Home »
C solved programs »
C basic programs
C program to find area of rectangle
This program will read length and breadth of the rectangle and find area of the rectangle.
Area of rectangle program in c
/*C program to find area of a rectangle.*/
#include <stdio.h>
int main()
{
float l,b,area;
printf("Enter the value of length: ");
scanf("%f",&l);
printf("Enter the value of breadth: ");
scanf("%f",&b);
area=l*b;
printf("Area of rectangle: %f\n",area);
return 0;
}
Output
Enter the value of length: 1.25
Enter the value of breadth: 3.15
Area of rectangle: 3.937500
C Basic Programs »