First off the most scary thing that I see is the global variables defined just below your line using namespace std;. Arrrhh.... don't do this, they are not needed.
Next reduction is missing a few brackets.
Yes gcd CAN be zero if say numerator and denominator are 1.
Now the algorithm used is a mess. It is easier to count up, than down.
You will not found a common factor that is bigger than the SMALLEST of the
numerator and denominator, e.g. 1/387642212 is not going to be reduced
regardless of the factors in the denominator.
So the algorithm you need:
Loop I: from 2 to smallest number
while (I is common factor)
divided denominator and numerator
recalc smallest number
Note: It is very important to check a factor many times, e.g. consider 16/32,
2 is a factor but you can divide by 2, four times.
Improvements of this algorithm include : using a prime sieve, so you only have
to test primes, stepping up in 2s, looping to the sqrt(smallest) , but remembering
to test the smallest number as well.