wikipedia euclidean algorithm code example
Example: gcd algorithm
function gcd(a, b)
if b = 0
return a
else
return gcd(b, a mod b)
function gcd(a, b)
if b = 0
return a
else
return gcd(b, a mod b)