The greatest common divisor is the largest positive integer that divides the numbers without a remainder.
Write a function which would find gcd.
Write a function which would find gcd.
int gcd(int a, int b)
{
int c = min(a, b);
while (a % c + b % c) --c;
return c;
}