Sum multiples of 3 and 5: Difference between revisions
Content deleted Content added
→{{header|BASIC}}: incorrect |
→{{header|Perl 6}}: add entry |
||
Line 20: | Line 20: | ||
467 |
467 |
||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
<lang perl6>sub sum35($n) { [+] grep * %% (3|5), ^$n; } |
|||
say sum35 1000;</lang> |
|||
{{out}} |
|||
<pre>233168</pre> |