Ask Question
11 April, 06:59

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.

+3
Answers (1)
  1. 11 April, 09:28
    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?
Find 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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers