Q:

Write a C program to find area of rectangle

0

C program to find area of rectangle

This program will read length and breadth of the rectangle and find area of the rectangle.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C programming Basic Input, Output, if else, Ternary Operator based Programs

Similar questions


need a help?


find thousands of online teachers now
Write a C program to find HCF (Highest Common Fact... >>
<< Write a C program to find area and perimeter of ci...