Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- int array[5][5];
- int num;
- int i,j;
- FILE *fp;
- char textFile[100];
- scanf("%s", textFile);
- fp=fopen(textFile, "r");
- for(i=0;i<3; i++)
- {
- for(j=0; j<3; j++)
- {
- fscanf(fp,"%d", &array[i][j]);
- }
- printf("\n");
- }
- for(i=0;i<3; i++)
- {
- for(j=0; j<3; j++)
- {
- printf("%d ", array[i][j]);
- }
- printf("\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement