Ask Question
23 November, 23:47

Use an ifstream object named indata to read the first three integers from a file called lottowins and write each number to standard output, on a line by itself. Assume that an ifstream object named indata has already been declared. Write code that uses the indata object to open a file named "lottowins". Then, read the first three integers from the file and write each number to standard output, on a line by itself. Last, close the file.

+2
Answers (1)
  1. 24 November, 01:03
    0
    int x;

    indata. open ("lottowins");

    indata >> x;

    cout << x << endl;

    indata >> x;

    cout << x << endl;

    indata >> x;

    cout << x << endl;

    indata. close ();
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Use an ifstream object named indata to read the first three integers from a file called lottowins and write each number to standard output, ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers