Append numbers at same position in strings: Difference between revisions

m
→‎{{header|RPL}}: Add implementation with HP-49g extended instruction set
(Created Nim solution.)
m (→‎{{header|RPL}}: Add implementation with HP-49g extended instruction set)
Line 722:
 
=={{header|RPL}}==
Using the basic instruction set:
≪ 3 →LIST → lists
≪ { } 1 lists 1 GET SIZE '''FOR''' j
"" 1 3 '''FOR''' k lists k GET j GET →STR + '''NEXT''' STR→ + '''NEXT'''
≫ ≫ ''''<span style="color:blue">TASK'''</span>' STO
Using the extended instruction set introduced in 2003:
{{in}}
{{works with|HP|49}}
<pre>
{ 1 2 3 4 5→STR 6+ 7+ 8STR→ 9 }DOLIST
≫ '<span style="color:blue">TASK</span>' STO
{ 10 11 12 13 14 15 16 17 18 }
'''Input:'''
{ 19 20 21 22 23 24 25 26 27 }
{ 1 2 3 4 5 6 7 8 9 } { 10 11 12 13 14 15 16 17 18 } { 19 20 21 22 23 24 25 26 27 } <span style="color:blue">TASK</span>
TASK
</pre>
{{out}}
<pre>
1,151

edits