#include "stdafx.h" #include using namespace std; int main() { double A[2][5] = { { 1,2,3,4,5 } ,{ 10,20,30,40,50 } }; double B[5][2]; int i, j; // print of A for (i = 0; i < 2; i++) { for (j = 0; j < 5; j++) cout << A[i][j] << "\t"; cout << endl; } // transpose A into B for (i = 0; i < 2; i++) { for (j = 0; j < 5; j++) B[j][i] = A[i][j]; } return 0; }