#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]; if (j != n) cout << " "; } if (i != n) cout << endl; } return 0; } |
Double click to view unformatted code.