int** A = (int**)malloc(rows * sizeof(int*));
int** B = (int**)malloc(cols * sizeof(int*));
for (int i = 0; i < rows; i++) {
A[i] = (int*)malloc(cols * sizeof(int));
for (int i = 0; i < cols; i++) {
B[i] = (int*)malloc(rows * sizeof(int));
for (int i = 0; i < rows; i++) {
for (int j = 0; j < cols; j++) {
transpose(A, B, rows, cols);
for (int i = 0; i < cols; i++) {
for (int j = 0; j < rows; j++) {
for (int i = 0; i < rows; i++) {
for (int i = 0; i < cols; i++) {