Anonymous user
Sum multiples of 3 and 5: Difference between revisions
→{{header|BASIC}}: from history I see that perhaps a count was intended, not a sum
(→{{header|Perl 6}}: add entry) |
(→{{header|BASIC}}: from history I see that perhaps a count was intended, not a sum) |
||
Line 3:
== {{header|BASIC}} ==
{{works with|FreeBASIC}}
{{incorrect||(Or if the function is right, then the
<lang basic>Declare function mulsum35(n as integer) as integer
Function mulsum35(n as integer) as integer
Line 19:
{{out}}
467
=={{header|Perl 6}}==
<lang perl6>sub sum35($n) { [+] grep * %% (3|5), ^$n; }
|