Sum multiples of 3 and 5: Difference between revisions

no edit summary
(add Forth)
No edit summary
Line 306:
{{out}}
<pre>233168</pre>
 
=={{header|Mathematica}}==
<lang mathematica>Total[Select[Range[1000-1],Divisible[#,3]||Divisible[#,5]&]]</lang>
{{out}}
<pre>233168</pre>
<lang mathematica>{1,1,-1}.(Sum[i,{i,0,10*^20-1,#}]&/@{3,5,3*5})</lang>
{{out}}
<pre>233333333333333333333166666666666666666668</pre>
 
=={{header|NetRexx}}==