basic and euclidean algorithm code example
Example 1: gcd algorithm
function gcd(a, b)
if b = 0
return a
else
return gcd(b, a mod b)
Example 2: euclid algorithm
def MCD(a,b):
while b != 0:
a, b = b, a % b
return a