diff --git a/src/gcd.c b/src/gcd.c index 2792dbc..9eca57c 100644 --- a/src/gcd.c +++ b/src/gcd.c @@ -1,8 +1,10 @@ #include -const int n = 10000; +const int n = 1000; unsigned int Euclidean_gcd_rec(unsigned int x, unsigned int y){ + if(x == 0) return y; + return Euclidean_gcd_rec(y % x, x); } /*