Pan base non-primes: Difference between revisions
m
→{{header|Perl}}: oops, off-by-one
SqrtNegInf (talk | contribs) (Added Perl) |
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: oops, off-by-one) |
||
Line 487:
say "First 50 pan-base composites:\n" . table 10, @np[0..49];
say "First 20 odd pan-base composites:\n" . table 10, (grep { 0 != $_ % 2 } @np)[0..19];
say "Count of pan-base composites up to and including $max: "
say "Percent odd up to and including $max: " . sprintf '%.3f', 100 *
say "Percent even up to and including $max: " . sprintf '%.3f', 100 *
{{out}}
<pre>First 50 pan-base composites:
Line 503:
Count of pan-base composites up to and including 2500: 953
Percent odd up to and including 2500: 16.
Percent even up to and including 2500: 83.
=={{header|Phix}}==
|