Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Double file input
- #include <bits/stdc++.h>
- #define endl "\n"
- using namespace std;
- int main()
- {
- FILE *f1, *f2;
- int n1, n2;
- //cout << "Hello Robert" << endl;
- f1 = fopen("in1.txt", "r");
- f2 = fopen("in2.txt", "r");
- while(fscanf(f1, "%d", &n1) != EOF)
- {
- //cout << "here" << endl;
- fscanf(f2, "%d", &n2);
- cout << n1 + n2 << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement