Sum multiples of 3 and 5: Difference between revisions
Content added Content deleted
(→{{header|BASIC}}: from history I see that perhaps a count was intended, not a sum) |
Walterpachl (talk | contribs) (REXX added -- another result :-)) |
||
Line 26:
{{out}}
<pre>233168</pre>
=={{header|REXX}}==
<lang rexx>/* REXX ***************************************************************
* 14.05.2013 Walter Pachl
**********************************************************************/
Say mul35()
exit
mul35:
s=0
Do i=1 To 1000
If i//3=0 | i//5=0 Then
s=s+i
End
Return s</lang>
Output:
<pre>234168</pre>
|