Coprimes: Difference between revisions
Content added Content deleted
(add RPL) |
imported>Maxima enthusiast No edit summary |
||
Line 872: | Line 872: | ||
<pre> 17 18 |
<pre> 17 18 |
||
23 29</pre> |
23 29</pre> |
||
=={{header|Maxima}}== |
|||
<syntaxhighlight lang="maxima"> |
|||
/* Taken the list of pairs and making a sublist of those pairs that are coprimes */ |
|||
pairs:[[21,15],[17,23],[36,12],[18,29],[60,15]]$ |
|||
sublist(pairs,lambda([x],apply('gcd,x)=1)); |
|||
</syntaxhighlight> |
|||
{{out}} |
|||
<pre> |
|||
[[17,23],[18,29]] |
|||
</pre> |
|||
=={{header|Nim}}== |
=={{header|Nim}}== |