Advertisement
Josif_tepe

Untitled

Mar 3rd, 2021
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main() {
  4.     int n;
  5.     cin >> n;
  6.     int mat[n][n];
  7.     for(int i = 0; i < n; i++) {
  8.         for(int j = 0; j < n; j++) {
  9.             cin >> mat[i][j];
  10.         }
  11.     }
  12.     for(int i = 0; i < n; i++) {
  13.         for(int j = i + 1; j < n; j++) {
  14.             cout << mat[i][j] << " ";
  15.         }
  16.         cout << endl;
  17.     }
  18.     return 0;
  19. }
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement