#include<stdio.h>
int main()
{
int length,breadth,area,perimeter,dif;
printf("Enter a your length and breadth of a rectangle ");
scanf("%d %d",&length,&breadth);
area=length*breadth;
perimeter=2*(length+breadth);
if (area>perimeter)
{
area=area-perimeter;
printf("Area is greater than perimeter ");
}
else
{
if(perimeter>area);
{
perimeter=perimeter-area;
printf("Perimeter is greater than area");
}
}
}
int main()
{
int length,breadth,area,perimeter,dif;
printf("Enter a your length and breadth of a rectangle ");
scanf("%d %d",&length,&breadth);
area=length*breadth;
perimeter=2*(length+breadth);
if (area>perimeter)
{
area=area-perimeter;
printf("Area is greater than perimeter ");
}
else
{
if(perimeter>area);
{
perimeter=perimeter-area;
printf("Perimeter is greater than area");
}
}
}
No comments:
Post a Comment