I\'m writing a mixed numeral class and need a quick and easy \'greatest common divisor\' function. Can anyone give me the code or a link to the code?
The Euclidean algorithm is quite easy to write in C.
int gcd(int a, int b) { while (b != 0) { int t = b; b = a % b; a = t; } return a; }