Matrix transposition: Difference between revisions

Content added Content deleted
m (→‎{{header|SPAD}}: "works with" takes only a single implementation as argument)
No edit summary
Line 2,588: Line 2,588:
6.07 66666666
6.07 66666666
7.07 777777777
7.07 777777777
</pre>

=={{header|Ring}}==
<lang ring>
load "stdlib.ring"
transpose = newlist(5,4)
matrix = [[78,19,30,12,36], [49,10,65,42,50], [30,93,24,78,10], [39,68,27,64,29]]
for i = 1 to 5
for j = 1 to 4
transpose[i][j] = matrix[j][i]
see "" + transpose[i][j] + " "
next
see nl
next
</lang>
Output:
<pre>
78 49 30 39
19 10 93 68
30 65 24 27
12 42 78 64
36 50 10 29
</pre>
</pre>