Coprimes: Difference between revisions
Added Quackery.
Drkameleon (talk | contribs) (Added Arturo implementation) |
(Added Quackery.) |
||
Line 788:
{{Out}}
<pre>[(17, 23), (18, 29)]</pre>
=={{header|Quackery}}==
<code>gcd</code> is defined at [[Greatest common divisor#Quackery]].
<lang Quackery> [ gcd 1 = ] is coprime ( n n --> b )
' [ [ 21 15 ]
[ 17 23 ]
[ 36 12 ]
[ 18 29 ]
[ 60 15 ] ]
witheach
[ unpack 2dup swap
echo say " and " echo
say " are"
coprime not if
[ say " not" ]
say " coprime." cr ]</lang>
{{out}}
<pre>21 and 15 are not coprime.
17 and 23 are coprime.
36 and 12 are not coprime.
18 and 29 are coprime.
60 and 15 are not coprime.
</pre>
=={{header|Raku}}==
|