Consider the following recursive method that calculates the greatest common divisor using Euclidean method.
Trace the above method for x=32 and y=46PHP Code:
public static int GCD ( int x , int y )
{
if ( y == 0 )
return x;
else if ( x >= y && y > 0)
return GCD ( y , x % y );
else return GCD ( y , x );
}