Sum multiples of 3 and 5: Difference between revisions

→‎{{header|dc}}: Add implementation
(→‎{{header|UNIX Shell}}: Add implementation)
(→‎{{header|dc}}: Add implementation)
Line 1,174:
2333333333333333333316666666666666666668</pre>
 
=={{header|dc}}==
<lang dc>[ Sm Sn lm 1 - d ln % - d sm ln / ln lm + * 0k 2 / Ss Lm sx Ln sx Ls ]sm
 
[ d d d 3 r lmx r 5 r lmx + r 15 r lmx - ]ss
 
[ 27 P 91 P 65 P 27 P 91 P 50 P 50 P 67 P ]su
 
[ ll p lsx lux p ll 10 * d sl 1000000000000000000000 >d]sd
 
1 sl ldx</lang>
 
{{Out}}
<pre>1 0
10 23
100 2318
1000 233168
10000 23331668
100000 2333316668
1000000 233333166668
10000000 23333331666668
100000000 2333333316666668
1000000000 233333333166666668
10000000000 23333333331666666668
100000000000 2333333333316666666668
1000000000000 233333333333166666666668
10000000000000 23333333333331666666666668
100000000000000 2333333333333316666666666668
1000000000000000 233333333333333166666666666668
10000000000000000 23333333333333331666666666666668
100000000000000000 2333333333333333316666666666666668
1000000000000000000 233333333333333333166666666666666668
10000000000000000000 23333333333333333331666666666666666668
100000000000000000000 2333333333333333333316666666666666666668</pre>
=={{header|Delphi}}==
<lang delphi>program sum35;
1,480

edits