Ask Question
22 February, 12:32

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. 22 February, 12:52
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers