Advertisement
Josif_tepe

Untitled

Aug 24th, 2023
1,045
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. int main(int argc, const char * argv[]) {
  4.     FILE *in = fopen("input.txt", "r");
  5.    
  6.     int n;
  7.     fscanf(in, "%d", &n);
  8.    
  9.     int mat[n][n];
  10.     for(int i = 0; i < n; i++) {
  11.         for(int j = 0; j < n; j++) {
  12.             fscanf(in, "%d", &mat[i][j]);
  13.         }
  14.     }
  15.     return 0;
  16.    
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement