luc014.c ​
Metadata ​
- Author — Amit Dutta (amitdutta4255@gmail.com)
- Last updated — 12 Dec 2025
- License — MIT
Problem Statement ​
Problem Statement
Given the length and breadth of a rectangle, write a program to find whether the area of the rectangle is greater than it's perimeter. For example, the area of the rectangle with length = 5 and breadth = 4 is greater than its perimeter.
Source Code ​
Printing the code
To print this file, open it on GitHub and click Raw before printing, or use the Download Raw button above and print directly from that page.
c
#include <stdio.h>
int main()
{
double len, bre, area, peri;
printf("Enter the length and breadth of the rectangle : ");
scanf("%lf %lf", &len, &bre);
area = len * bre;
peri = 2 * (len + bre);
if (area > peri)
printf("\nThe area of the rectangle is greater than it's perimeter.");
else if (area < peri)
printf("\nThe area of the rectangle is lower than it's perimeter.");
else
printf("\nThe area of the rectangle is same as it's perimeter.");
return 0;
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16