bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_1 / letusc / luc014.c

luc014.c (808B)


      1 /* Given the length and breadth of a rectangle, write a program to find
      2 whether the area of the rectangle is greater than it's perimeter.
      3 For example, the area of the rectangle with length = 5 and breadth = 4
      4 is greater than its perimeter. */
      5 /* Let Us C, Chap- 3, Page - 53, Qn No.: f(e) */
      6 
      7 #include <stdio.h>
      8 int main()
      9 {
     10     double len, bre, area, peri;
     11     printf("Enter the length and breadth of the rectangle : ");
     12     scanf("%lf %lf", &len, &bre);
     13     area = len * bre;
     14     peri = 2 * (len + bre);
     15     if (area > peri)
     16         printf("\nThe area of the rectangle is greater than it's perimeter.");
     17     else if (area < peri)
     18         printf("\nThe area of the rectangle is lower than it's perimeter.");
     19     else
     20         printf("\nThe area of the rectangle is same as it's perimeter.");
     21     return 0;
     22 }
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror