Download numbers.txt. The text file contains a large amount of integers. The integers range in value from 0 to 100. The text file has been created with one value on each line.
The number of integers in the file is unknown. You must continue reading the file until there are no more integers to read. Your program should work with any number of integers, however the sum of the integers will not be larger than the maximum int value.
Your program must find the average of the list of numbers.
Your program should print out the average of the data in numbers.txt to the console window. Format the average to print to the console rounded to 2 decimal places (Hint: you can use printf or use a calculation to find the rounded value).
Your program should also write the average of the numbers to a new text file called "output.txt". You don't need to format the average written to the file to 2 decimal places (but it's a fun exercise to try!).
Turn in your source code below. You don't need to turn in the output file.
Name your class
PX_LastName_FirstName_Average
You must Sign In to submit to this assignment
Last modified: December 12, 2022
Back to Lab 13.1 Errorcheck