Greatest common divisor: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 453:
return gcd(a, b-a);
}</lang>
 
===Recursive===
<land d>
long gcd(long x, long y) {
if (y == 0)
return x;
return gcd(y, x%y);
}
</lang>
 
=={{header|Dc}}==
Anonymous user