Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int bai1()
- {
- FILE *f;
- f = fopen("data1.txt", "r");
- if (f == NULL)
- {
- printf("ERROR\n");
- }
- else
- {
- fscanf(f, "%d", &n);
- }
- for (int i = 1; i <= n; i++)
- {
- for (int j = 1; j <= m; j++)
- {
- fscanf(f, "%d", &matrix[i][j]);
- printf("map[%d][%d] = %d\n", i, j, matrix[i][j]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment