Untitled
Anonymous
plain_text
12/17/2022 4:16 PM
576 B
10
Indexable
#include <iostream>
#include <cmath>
#include <vector>
using namespace std;
int main() {
int a,b;
int mas[100][100];
cin >> a >> b;
for (int i = 0; i < a; i++){
for (int j = 0; j < b; j++) {
cin >> mas[i][j];
}
}
for (int i = 0; i < b; i++){
for (int j = 0; j < a; j++) {
cout << mas[j][i] << ' ';
}
cout << '\n';
}
}
Editor is loading...