View Code of Problem 45

#include<iostream>

using namespace std;

int main(void){
	int m,map[1000][1000];
	cin >> m;
	for(int i=0;i<m;i++){
		for(int j=0;j<m;j++){
			cin >> map[i][j];
		}
	}

	for(int i=0;i < m;i++){
		cout<<map[0][i];
		for(int j=1;j < m;j++){
			cout << ' ' << map[j][i];
		}
		cout << endl;
	}
}

Double click to view unformatted code.


Back to problem 45