Sum multiples of 3 and 5: Difference between revisions
m
Regularize non-standard header markup
(→{{header|Clojure}}: Add transducer approach and clean up optimized approach) |
Thundergnat (talk | contribs) m (Regularize non-standard header markup) |
||
Line 205:
</pre>
==
<lang apl>⎕IO←0
{+/((0=3|a)∨0=5|a)/a←⍳⍵} 1000</lang>[http://ngn.github.io/apl/web/index.html#code=%7B+/%28%280%3D3%7Ca%29%u22280%3D5%7Ca%29/a%u2190%u2373%u2375%7D%201000,run=1 run]
Line 211:
<pre>233168</pre>
==
{{Trans|JavaScript}}
<lang AppleScript>----------------- SUM MULTIPLES OF 3 AND 5 -----------------
Line 368:
2333333333333333333316666666666666666668</pre>
==
{{works with|FreeBASIC}}
<lang freebasic>Declare function mulsum35(n as integer) as integer
Line 434:
2333333333333333333316666666666666666668</pre>
==
Slow (iterative) version:
<lang Befunge>&1-:!#v_:3%#v_ >:>#
|