Quote:
|
Originally Posted by andro
The Euclidean algorithm is recursive, not to mention the same method he is using 
|
True, but also on that page is the same algorithm written iteratively:
int gcd(int a, int b) {
int t;
while (b != 0) {
t = b;
b = a % b;
a = t;
}
return a;
}