Count in factors: Difference between revisions
m
→{{header|Raku}}: Fix-up some Perl6 -> Raku references
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Fix-up some Perl6 -> Raku references) |
||
Line 3,199:
19: 19
20: 2 × 2 × 5</pre>
Here we use a <tt>multi</tt> declaration with a constant parameter to match the degenerate case. We use <tt>copy</tt> parameters when we wish to reuse the formal parameter as a mutable variable within the function. (Parameters default to readonly in
Note also the '×' above is not ASCII 'x', but U+00D7 MULTIPLICATION SIGN.
Here is a solution inspired from [[Almost_prime#C]]. It doesn't use &is-prime.
|