Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- #include <iostream>
- using namespace std;
- int main()
- {
- ifstream inFile;
- ofstream outFile;
- inFile.open("inData.txt");
- outFile.open("outData.txt");
- int n1, n2, n3, n4;
- char ch;
- inFile >> n1;
- inFile >> n2;
- inFile >> ch;
- inFile >> n3;
- inFile >> n4;
- outFile << "The Sum of " << n1 << " and " << n2 << " = " << n1 + n2 << endl;
- outFile << "The character that comes after " << ch;
- outFile.flush();
- outFile << " in the ASCII set is " << ++ch << endl;
- outFile << "The product of " << n3 << " and " << n4 << " = " << n3 * n4 << endl;
- inFile.close();
- outFile.close();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement