Distance Comparizon

Description:

The perimeter of this rectangle is 7+3+7+3 = 20. Example: The perimeter of this regular pentagon is 3+3+3+3+3 = 53 = 15. The perimeter of a circle is called the circumference: Circumference = 2pi*radius. Test Case 1 Input (stdin) 10 15 Expected Output 150 50 Test Case 2 Input (stdin) 100 150 Expected Output 15000 500

Program :

#include <iostream>

using namespace std;

int main()

{

int a,b,c,d,e,f;

  cin>>a>>b>>c>>d;

  e=a+b;

  f=c+d;

  if(e>=f)

  {

  if(e==f)

    cout<<"Both are equal";

  else

    cout<<"First One is Greater";

  }

  else

    cout<<"Second One is Greater";

return 0;

}