Arithmetic/Rational: Difference between revisions
m
→{{header|Perl 6}}: use .nude
m (added ;Task: and ;Related task: (bold) headers.) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: use .nude) |
||
Line 2,530:
=={{header|Perl 6}}==
{{
Perl 6 supports rational arithmetic natively.
<lang perl6>for 2..2**19 -> $candidate {
Line 2,539:
}
}
if $sum.
say "Sum of reciprocal factors of $candidate = $sum exactly", ($sum == 1 ?? ", perfect!" !! ".");
}
|