#include #include using namespace std; int main() { int x1 ; ofstream outputFile; outputFile.open("demofile.txt"); cout << "Now writing data to the file.\n"; // Write four names to the file. outputFile << "Bach\n"; outputFile << "Beethoven\n"; outputFile << "Mozart\n"; outputFile << "Schubert\n"; x1 = 100 ; outputFile << x1 << endl ; // Close the file outputFile.close(); cout << "Done.\n"; return 0; }