Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <string>
- using namespace std;
- int main ()
- {
- string line;
- long a, b;
- ifstream myfile ("sum.in");
- if (myfile.is_open())
- {
- myfile >> a >> b;
- long c = a + b;
- ofstream myfile2("sum.out");
- myfile2 << c;
- myfile2.close();
- myfile.close();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement