Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <math.h>
- int n = 3;
- int m = 3;
- int main(int argc, char *argv[])
- {
- int szerega[n][m];
- int szeregb[n][m];
- int szeregc[n][m];
- FILE *inputFile;
- int number;
- inputFile = fopen(argv[1], "r" );
- if(inputFile == 0) {
- printf("Can't open '%s'\n", argv[1]);
- return 1;
- }
- while(fscanf(inputFile, "%i", &number)==1)
- {
- printf("%i\n", number);
- }
- for(int x = 0; x < n; x++) {
- for(int y = 0; y < m; y++) {
- if(szerega[x][y] > szeregb[x][y])
- szeregc[x][y] = szerega[x][y];
- else
- szeregc[x][y] = szeregb[x][y];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement