-->
当前位置:首页 > 题库

PROGRAMMING:Matrix transpose

Luz5年前 (2021-05-10)题库421
Program to exchange the row and column numbers of elements in array A and store them in array B (equivalent to matrix transpose).
###Input format:
The first two integers m and n (positive integer, absolute value no more than 20) indicate that the matrix A is m rows and N columns, and the matrix is n rows and m columns.
Next is m rows, n integers per row, representing all elements of matrix A.
###Output format:
Output transposed matrix B by line.
###Input example:
```in
3 4
101 205 703 504
400 105 687 306
608 909 205 512
```
###Output example:
```out
101 400 608
205 105 909
703 687 205
504 306 512
```







answer:If there is no answer, please comment