Advertisement
Josif_tepe

Untitled

Jan 8th, 2024
792
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int main(int argc, const char * argv[]) {
  5.     int n;
  6.     scanf("%d", &n);
  7.  
  8.     int mat[n][n];
  9.     for(int i = 0; i < n; i++) {
  10.         for(int j = 0; j < n; j++) {
  11.             scanf("%d", &mat[i][j]);
  12.         }
  13.     }
  14.  
  15.     for(int i = 0; i < n; i++) {
  16.         for(int j = 0; j < i; j++) {
  17.             printf("%d ", mat[i][j]);
  18.         }
  19.     }
  20.     return 0;
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement