Sum multiples of 3 and 5: Difference between revisions
→{{header|UIUA}}
imported>KayproKid (Added PL/I-80 example) |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 4,888:
Completed in 4 seconds.
=={{header|Uiua}}==
<syntaxhighlight>
End ← 1000
MultOfthree ← ⊚=0◿3 # indices where divisible by 3
Indicesthree ← MultOfthree ↘1⇡End
MultOffive ← ⊚=0◿5 # indices where divisible by 5
IndicesFive ← MultOffive ↘1⇡End
/+ ⊏⊂ Indicesthree IndicesFive ↘1⇡End # join, select and sum
</syntaxhighlight>
{{out}}
233168
</pre>
=={{header|UNIX Shell}}==
Line 5,052 ⟶ 5,067:
=={{header|Wren}}==
===Simple version===
<syntaxhighlight lang="
n = n - 1
var s3 = (n/3).floor
Line 5,074 ⟶ 5,089:
{{libheader|Wren-gmp}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
import "./fmt" for Fmt
|