Area and Perimeter of Rectangle in C - 👑 सार्थक मुंड S3 🤴🏻

Area and Perimeter of Rectangle in C

Area and Perimeter of Rectangle in C

Write a program (WAP) in C to calculate Area and Perimeter of rectangle.

#include <stdio.h>
int main()
{
    float l,b,area,perimeter;

    printf("Enter length of Rectangle : ");
    scanf("%f",&l);

    printf("Enter breadth of Rectangle: ");
    scanf("%f",&b);

    area=l*b;
    printf("Area of rectangle : %0.4f\n",area);
    perimeter=2*(l+b);
    printf("Perimeter of rectangle:  %0.3f\n",perimeter);

    return 0;
}
Try it Yourself ➠
Area and Perimeter of Rectangle in C

Must Read :-
  1. Blogger Tutorial
  2. C Programs
  3. C++ Programs
  4. Java Programs
  5. Python Programs
  6. Programming Notes 
  7. Questions & Answers
  8. My Codes : HTML, CSS & JS
  9. All Subject Notes
Previous article
Next article

Leave Comments

Post a Comment

Articles Ads

Articles Ads 1

Articles Ads 2

Advertisement Ads