C Gcd Function