Untitled

mail@pastecode.io avatar
unknown
c_cpp
3 years ago
444 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 = 0; j < m; j++) {
            if(i + j == n - 1) {
                cout << mat[i][j] << endl;
            }
        }
    }
    return 0;
}