luc014.c
Problem Statement
luc014.c
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
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
● Author - Amit Dutta · Updated - 12 Dec 2025