View Code of Problem 45

#include<iostream>
#include<cmath>
#include<cstdio>
using namespace std;

int main() {
	int num[100][100], out[100][100];
	int n;
	cin >> n;
	
	for (int i = 1; i <= n;i++) {
		for (int j = 1; j <= n; j++) {
			cin >> num[i][j];
		}
	}
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= n; j++) {
			cout << num[j][i]<<" ";
		}
		cout << endl;
	}
	return 0;
}

Double click to view unformatted code.


Back to problem 45