Greatest common divisor: Difference between revisions

Updated D entry
(Added a function)
(Updated D entry)
Line 583:
<lang d>import std.stdio, std.numeric;
 
long myGCD(in long x, in long y) pure nothrow @nogc {
if (y == 0)
return x;
Line 590:
 
void main() {
writeln(gcd(15, 10)).writeln; // fromFrom Phobos.
writeln(myGCD(15, 10)).writeln;
}</lang>
{{out}}