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;
}
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)
Try this method,
You have missed the fourth step
You forgot Equal case