Coprimes: Difference between revisions
m
→{{header|Raku}}: meh
Thundergnat (talk | contribs) (→{{header|Raku}}: Add a Raku entry) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: meh) |
||
Line 35:
=={{header|Raku}}==
How do you determine if numbers are co-prime? Check to see if the [[Greatest common divisor]] is equal to one.
<lang perl6>say .raku, ( [gcd] |$_ ) == 1 ?? ' Coprime' !! '' for [21,15],[17,23],[36,12],[18,29],[60,15]</lang>
|