Write A C Program to Find Whether Area is Greater then it’s Perimeter?

C Program to Find Whether Area is Greater than its Perimeter?

In This article, we are going to create a program that will find the area and perimeter and will compare both. We need to verify that area should be greater than its perimeter.

Program:

#include<stdio.h>
int main()
{
int length=5, breadth=4, area, perimeter; //variable declaration and initilization
area =length*breadth;  //formula to calculate area

printf(“AREA =%d\n”,area);

perimeter=2(length+breadth); //formula to calculate area
printf(“PERIMETER=%d\n”,perimeter);
if(area>perimeter) //condition if area is greater than perimeter then print area
printf(“Area =%d is greator\n”,area);
}

Leave a Comment