Question: Can somone help me make a program that generates a list of random integers and outputs them to a file named randomNumbers.txt.Then the program opens

Can somone help me make a program that generates a list of random integers and outputs them to a file named "randomNumbers.txt".Then the program opens the le "randomNumbers.txt" as the input file, reads all the numbers from the file, and outputs the largest/smallest numbers and the average of all the numbers to the screen.

The "randomNumbers.txt" file contains nothing but numbers of type int separated by blanks and/or line breaks. You can choose the size of the list and the range of the random numbers. You will need to create one or more test files in order to test your program

The program should display the largest and smallest numbers, and the average of all the numbers to the screen.

Hints: the program should calculate the followings:

  • The number of numbers in the le
  • The largest and smallest numbers
  • The sum of all the numbers in the le (a running total)

The average of all the numbers in the le

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!