Skip to content
This repository was archived by the owner on Nov 30, 2022. It is now read-only.

Commit 4727694

Browse files
authored
Merge pull request #37 from ramonssarmento/master
Recursive euclidean algorithm
2 parents a849581 + 784bc84 commit 4727694

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

recursive_euclidean_algorithm.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
def gcd(a, b):
2+
if b == 0:
3+
return a
4+
return gcd(b, a % b)
5+
6+
7+
a = 192
8+
b = 162
9+
print(gcd(a,b) == gcd(b,a), gcd(a,b))

0 commit comments

Comments
 (0)