Josif_tepe

Untitled

Aug 28th, 2025
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.48 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.         printf("%d ", mat[i][n - 1 - i]);
  20.     }
  21.    
  22.    
  23.     return 0;
  24. }
  25.  
  26. /*
  27.  8
  28.  1.3 0.7  7.0   2.5  3.3  14.9  5.1  2.24
  29.  **/
  30.  
Advertisement
Add Comment
Please, Sign In to add comment