Untitled

mail@pastecode.io avatar
unknown
c_cpp
3 years ago
418 B
1
Indexable
Never
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
    int n, m;
    cin >> n >> m;
    
    int mat[n][m];
    for(int i = 0; i < n; i++) {
        for(int j = 0; j < m; j++) {
            cin >> mat[i][j];
        }
    }
    
    for(int i = 0; i < n; i++) {
        for(int j = n - i; j < n; j++) {
            cout << mat[i][j] << " ";
        }
        cout << endl;
    }
    return 0;
}