Include statements to print a heading and perform a priming


USING AN INPUT FILE In this lab, you open a file and read input from that file in a prewritten C++ program. The program should read and print the names of fish that are stored in the input file named fish.dat.

1. Open the source code file named Fish.cpp using Notepad or the text editor of your choice.

2. Declare the variables you will need.

3. Write the C++ statements that will open the input file fish.dat for reading.

4. Include statements to print a heading and perform a priming read. Then, write a while loop to read the input until EOF is reached.

5. In the body of the loop, print the name of each fish and read the next fish. When the loop is exited, remember to close the file.

6. Save this source code file in a directory of your choice and then make that directory your working directory.

7. Compile the source code file Fish.cpp.

8. Execute the program.

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Include statements to print a heading and perform a priming
Reference No:- TGS02194092

Expected delivery within 24 Hours