13.1 (Create a text file) Write a program to create a file named
data.txt if it does not exist. If it does exist, append new data to
it. Write 100 integers created randomly into the file using text
I/O. Integers are separate by a space. The source code filename
should be exercise13_1.cpp 13.3 (Process scores in a text file)
Suppose that a file data.txt contains an unspecified number of
scores. Write a program that reads the scores from the file and
displays their total and average. Scores are separated by blanks.
The source code filename should be exercise13_3.cpp Submit both C++
source codes. The exercise13_1.cpp and the exercise13_3.cpp. I
shall run exercise13_1.cpp, and it should create the data.txt file.
Which shall be read by exercise13_3.cpp to compute the total and
average of the numbers. The range for random numbers should be
between 1 and 100.
I don't know how to transfer data to next file please
explain!
13.1 (Create a text file) Write a program to create a file named data.txt if it does not exist. If it does exist, append
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
13.1 (Create a text file) Write a program to create a file named data.txt if it does not exist. If it does exist, append
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!