Question: will be written to the file (one number per line). If -99 is entered, the loop stops and the program terminates. Fill in the missing
will be written to the file (one number per line). If -99 is entered, the loop stops and the program terminates. Fill in the missing code, so the program will be completed. #include #include using namespace std; int main() { } ofstream outfile; outfile.open("sample.txt"); const int SENTINEL = -99; int num; while (true) ( } cout << "Enter a number: "; cin >> num; if (num != SENTINEL) else //FILL_IN_THE_MISSING CODE break; outfile.close(); return 0; outfile << num; DELL
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
