Even after getting the correct output the system is not selecting my program

https://www.codechef.com/problems/AREAPERI
Here goes my code.
#include
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if((2*(a+b))>(ab))
{
cout <<(2
(a+b))<<endl;
cout<<“Peri”<<endl;

}
else
{
cout<<(a*b)<<endl;
cout<<“Area”<<endl;
}
return 0;
}

if they are equal print “Eq”.(Without quotes)

1 Like

Try this method,

  1. Calculate Area and perimeter
  2. Check whether Area > Perimeter
  3. whether Perimeter < Area
  4. And Area == Perimeter

You have missed the fourth step

You forgot Equal case