Advertisement
Josif_tepe

Untitled

Feb 9th, 2021
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.47 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     scanf("%d", &n);
  9.     int mat[30][30];
  10.     for(int i = 0; i < n; i++) {
  11.         for(int j = 0; j < n; j++) {
  12.             scanf("%d", &mat[i][j]);
  13.         }
  14.     }
  15.     for(int i = 0; i < n; i++) {
  16.         for(int j = 0; j < n - i - 1; j++) {
  17.             printf("%d ", mat[i][j]);
  18.         }
  19.         printf("\n");
  20.     }
  21.         return 0;
  22.     }
  23. /*
  24. 4
  25. 1 2 3 4
  26. 5 6 7 8
  27. 9 10 11 12
  28. 13 14 15 16
  29.  */
  30.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement