Find area of rectangle in C by R4R Team

Area of rectangle:
area=l*b;
-Here,
l is length of rectangle
and b is breath of rectangle

program-

#include< stdio.h>
int main() {
int l,b;
float area;
printf("Enter Length of rectangle\n");
scanf("%d",&l);
printf("Enter breath of rectangle\n");
scanf("%d",&b);
area=b*l
; printf("Area of rectangle is %f",area);
}


output-

Enter length of rectangle
10
Enter breath of rectangle
3
Area is 30

-In this program, we take an input in the variable height and breath.
-Then apply formula for area of rectangle and store that value in variable 'area'.
-And at last display that area.




Leave a Comment:
Search
Categories
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!