Sum multiples of 3 and 5: Difference between revisions
Content deleted Content added
Applesoft BASIC |
|||
Line 470: | Line 470: | ||
<pre>233168</pre> |
<pre>233168</pre> |
||
==={{header|Applesoft BASIC}}=== |
|||
<syntaxhighlight lang="gwbasic"> 10 INPUT N |
|||
20 LET SUM = 0 |
|||
30 FOR I = 3 TO N - 1 |
|||
40 IF I / 3 = INT (I / 3) OR I / 5 = INT (I / 5) THEN SUM = SUM + I |
|||
50 NEXT I |
|||
60 PRINT SUM</syntaxhighlight> |
|||
==={{header|BASIC256}}=== |
==={{header|BASIC256}}=== |
||
<syntaxhighlight lang="basic256">function multSum35(n) |
<syntaxhighlight lang="basic256">function multSum35(n) |