Answer:
Following are the code which is mention below.
bool equals (int x, int y) // method equals
{
if( (x<0) || (y<0) ) // check number if it is less then 0
return false; // return false
if( (x==0) && (y==0) ) // check condition if number is equal to 0
return true; // return true
return equals(x-1, y-1);
}
Explanation:
1. if x and y both are less then 0 then it returns "false".
2. if x and y both are equal to 0 then it returns "true"
3. Otherwise it return x-1 and y-1.