Append numbers at same position in strings: Difference between revisions

Content added Content deleted
imported>Maxima enthusiast
No edit summary
imported>Katsumi
No edit summary
Line 142: Line 142:
11019 21120 31221 41322 51423 61524 71625 81726 91827
11019 21120 31221 41322 51423 61524 71625 81726 91827
</pre>
</pre>

=={{header|C}}==
<syntaxhighlight lang="c">#include<stdio.h>
#include<stdlib.h>

int main(void) {
int list[3][9], i;
for(i=0;i<27;i++) list[i/9][i%9]=1+i;
for(i=0;i<9;i++) printf( "%d%d%d ", list[0][i], list[1][i], list[2][i] );
return 0;
}</syntaxhighlight>
{{out}}<pre>11019 21120 31221 41322 51423 61524 71625 81726 91827</pre>



=={{header|BASIC}}==
=={{header|BASIC}}==
Line 232: Line 219:
<pre>Same as FreeBASIC entry.</pre>
<pre>Same as FreeBASIC entry.</pre>


=={{header|C}}==
<syntaxhighlight lang="c">#include<stdio.h>
#include<stdlib.h>

int main(void) {
int list[3][9], i;
for(i=0;i<27;i++) list[i/9][i%9]=1+i;
for(i=0;i<9;i++) printf( "%d%d%d ", list[0][i], list[1][i], list[2][i] );
return 0;
}</syntaxhighlight>
{{out}}<pre>11019 21120 31221 41322 51423 61524 71625 81726 91827</pre>


=={{header|CLU}}==
=={{header|CLU}}==