blob: 0819bc5e699f3c45915fc36deaf4ae61e9b14f4c (
plain)
1
2
3
4
5
6
7
8
9
10
|
def gcd(m,n):
if m< n:
(m,n) = (n,m)
if(m%n) == 0:
return n
else:
return (gcd(n, m % n)) # recursion taking place
# calling function with parameters and printing it out
print(gcd(8,12))
|