#include <iostream> using namespace std; int main() { int b[8][8] = {{1,2,3,4},{1,2,3,4},{1,2,3,4},{1,2,3,4}}; int m = 4; for(int i =0;i<m;i++) { for(int j=0;j<m;j++) { cout<<b[i][j]<<" "; } cout<<endl; } cout<<endl; for(int i =0;i<m;i++) { for(int j=0;j<m;j++) { cout<<b[j][i]<<" "; } cout<<endl; } cout<<endl; }