Question: Part 1 Write a C + + program that creates a file ( list . txt ) . The file contains 1 0 0 0

Part 1
Write a C++ program that creates a file (list.txt). The file contains 1000 integer numbers generated randomly, negative and positive ranges from -100 to 100. Organize the contents of the file to be printed in 100 lines and each line contains 10 aligned numbers, as you see below.
12-1208918113476898-5214-465777-2288-928.........-15-234-41-5297278019-38 Ensure that the file was created successfully before start writing data. You need to use random function with
a seed to generate all integers.
Part2
Write a C++ program that reads in the contents of the file created in part I. Your program prints out the total number of positive numbers, negative numbers, and zeros. Note that you must copy the file that you created in Part I to project folder that contains part II in order to get your program runs. Hence, ensure that the file exists and opened successfully before the program starts processing the data in the file.
Part 1 Write a C + + program that creates a file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!