Question: Create a program that reads a file called numbers.txt which contains an unknown quantity of integers. Your program should do the following with the data:
Create a program that reads a file called numbers.txt which contains an unknown quantity of integers. Your program should do the following with the data:
Calculate the sum of all numbers in the file
Calculate the average of all the numbers in the file
Determine the smallest number in the file
Determine the largest number in the file
Your program must print the results in a new file called results.txt. The contents of this file should be four (4) sentences displaying the results.
Example output:
The sum is 83747 The average is 198 The smallest is 4 The largest is 98
*** Should be in JAVA*****
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
