From 3c0ed3432dcddff226502a0966ff22e16ab0e4be Mon Sep 17 00:00:00 2001 From: showtamu <107395142+showtamu@users.noreply.github.com> Date: Fri, 17 Jun 2022 16:10:51 +0900 Subject: [PATCH 1/3] Update gcd.c --- src/gcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gcd.c b/src/gcd.c index b083f1b..143c168 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_rec(y % x, x); } /* From 4cc85e68dbeb8e862d8eb9596638dd47cfbe32af Mon Sep 17 00:00:00 2001 From: showtamu <107395142+showtamu@users.noreply.github.com> Date: Fri, 17 Jun 2022 16:17:12 +0900 Subject: [PATCH 2/3] Update gcd.c --- src/gcd.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gcd.c b/src/gcd.c index 143c168..b083f1b 100644 --- a/src/gcd.c +++ b/src/gcd.c @@ -3,8 +3,6 @@ const int n = 1000; unsigned int Euclidean_gcd_rec(unsigned int x, unsigned int y){ - if(x== 0) return y; - return Euclidean_gcd_rec_rec(y % x, x); } /* From 394b77f28f801521e5913979d2c01df83826a732 Mon Sep 17 00:00:00 2001 From: showtamu <107395142+showtamu@users.noreply.github.com> Date: Fri, 17 Jun 2022 17:03:28 +0900 Subject: [PATCH 3/3] Update gcd.c --- src/gcd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gcd.c b/src/gcd.c index b083f1b..d1d84d5 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_rec(y % x, x); } /*