Advertisement
Josif_tepe

Untitled

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