✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
The file contains ten integers across seven lines. The task is to find out the average of these ten integers and copy the integers as well as the average into another file called
Additional exercises:
Pick only those odd numbers from the ten
numbers of the file and write these odd numbers, as well as their average into an
output file.
Next, modify the original program so that
instead of assuming the number of integers to be read from the file, the
program reads till all the integers of the file are read.
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!