#include using namespace std; void transpose(double mat[][5], double trans[][4]) { //doing this in place is quite complicated and involves cycle permutaitons //We will do that later. for(int i=0; i< 4; i++) { for(int j =0; j< 5; j++) { trans[j][i] = mat[i][j]; } } //arrays pass by reference, so the original matrix already has the new vlaues. //We don't need to return anything } //Main function is left as na exercise