Sum multiples of 3 and 5: Difference between revisions
Content deleted Content added
Walterpachl (talk | contribs) REXX added -- another result :-) |
Walterpachl (talk | contribs) m →{{header|BASIC}}: 467 is the number of numbers not their sum |
||
Line 4:
{{works with|FreeBASIC}}
{{incorrect||(Or if the function is right, then the task description should say 'count of multiples of 3 or 5 no greater than a given number.' or some such...)}}
<br>I'd suggest to change s += 1 to s += I
<br>REXX also finds 467 numbers
<lang basic>Declare function mulsum35(n as integer) as integer
Function mulsum35(n as integer) as integer
|