gcd using euclidean algorithm code