Append numbers at same position in strings: Difference between revisions

Added C3
m (→‎{{header|Wren}}: Changed to Wren S/H)
(Added C3)
 
Line 230:
}</syntaxhighlight>
{{out}}<pre>11019 21120 31221 41322 51423 61524 71625 81726 91827</pre>
 
=={{header|C3}}==
<syntaxhighlight lang="c3">import std::io;
import std::collections::list;
 
fn void main()
{
int[9] list1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
int[9] list2 = { 10, 11, 12, 13, 14, 15, 16, 17, 18 };
int[9] list3 = { 19, 20, 21, 22, 23, 24, 25, 26, 27 };
List(<String>) list;
list.temp_init();
for (int i = 0; i < 9; i++)
{
list.push(string::tformat("%d%d%d", list1[i], list2[i], list3[i]));
}
io::printn(list);
}</syntaxhighlight>
{{out}}<pre>[11019, 21120, 31221, 41322, 51423, 61524, 71625, 81726, 91827]</pre>
 
=={{header|CLU}}==
38

edits