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






Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.