Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <fstream>
- #include <string>
- using namespace std;
- ifstream f1("input.txt"), f2("input2.txt");
- ofstream out("output.txt");
- int main()
- {
- int k, g;
- int s = 0;
- while (!f1.eof() && !f2.eof()) {
- f1 >> k;
- f2 >> g;
- s = k + g;
- out << (double)s / 2 << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement