A+B: Difference between revisions
Content added Content deleted
(Added J implementation) |
m (→{{header|J}}: Fixed explanation.) |
||
Line 235:
=={{header|J}}==
In the following line, <tt>(1!:1) 3</tt> reads a line from STDIN; <tt>_1}.</tt> drops the last newline character; <tt>
of which are converted into a number (by <tt>".
<lang J>+/".;.0 (_1}.(1!:1) 3)</lang>
Here's a little script, called "a+b.ijs":
|