Josif_tepe

Untitled

Aug 28th, 2025
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4. #include <string.h>
  5. #include <math.h>
  6. int main() {
  7.     int n;
  8.     scanf("%d", &n);
  9.    
  10.     int mat[n][n];
  11.    
  12.     for(int i = 0; i < n; i++) {
  13.         for(int j = 0; j < n; j++) {
  14.             scanf("%d", &mat[i][j]);
  15.         }
  16.     }
  17.    
  18.     for(int i = 0; i < n; i++) {
  19.         for(int j = 0; j < n; j++) {
  20.             if(j < i) {
  21.                 printf("%d ", mat[i][j]);
  22.             }
  23.         }
  24.     }
  25.    
  26.    
  27.     return 0;
  28. }
  29.  
  30. /*
  31.  8
  32.  1.3 0.7  7.0   2.5  3.3  14.9  5.1  2.24
  33.  **/
  34.  
Advertisement
Add Comment
Please, Sign In to add comment