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

Commit 784bc84

Browse files
Recursive euclidean algorithm
1 parent 74cd41c commit 784bc84

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)