Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main()
- {
- FILE *fp;
- FILE *fp_write;
- fp = fopen("test.txt", "r");
- fp_write = fopen("rezultati.txt", "w");
- int a, b, c, rez;
- while(fscanf(fp, "%d %d %d", &a, &b, &c) == 3)
- fprintf(fp_write, "%d\n", a + b + c);
- fclose(fp);
- fclose(fp_write);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement