Răspuns:
#include <iostream>
using namespace std;
int main()
{
int n, m, i, j, A[100][100];
cin >> n >> m;
for (i=0; i<n; i++)
{
for (j=0; j<m; j++)
cin >> A[i][j];
}
for (j=m-1; j>=0; j--)
{
for (i=0; i<n; i++)
cout << A[i][j] << " ";
cout << endl;
}
}
Explicație: