bsc

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

luc014.c (944B)


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