From 60948da16996a0c0c9fda44be95a7ab5ce192609 Mon Sep 17 00:00:00 2001 From: shino ITO Date: Wed, 15 Jun 2022 11:43:17 +0900 Subject: [PATCH] revised --- src/gcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gcd.c b/src/gcd.c index b083f1b..8a81144 100644 --- a/src/gcd.c +++ b/src/gcd.c @@ -3,6 +3,8 @@ 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); } /*