Greatest common divisor: Difference between revisions

Content added Content deleted
(Changed to show GCD of 0 and 0 as 0.)
(→‎dt: add)
Line 2,556: Line 2,556:
gcd(1071, 1029) = 21
gcd(1071, 1029) = 21
gcd(3528, 3780) = 252</pre>
gcd(3528, 3780) = 252</pre>

=={{header|dt}}==
{{works with|dt|1.2.3}}
<syntaxhighlight lang="dt">[dup [dup rot % loop] swap do?] \loop def

[loop drop] \gcd def</syntaxhighlight>


=={{header|DWScript}}==
=={{header|DWScript}}==