// output the result of x + y into a file 'sum.txt' #include #include #include using namespace std; const int x = 5, y = 11; int main() { ofstream outfile("sum.txt");// open output file sum.txt outfile << x + y << endl; // output to file outfile.close(); // close file }