Three methods for finding the greatest common divisor (C language)