Question: Write a program that generates 3 0 random numbers ( range 1 - 2 0 inclusive ) and then writes the numbers to a file.

Write a program that generates 30 random numbers (range 1-20 inclusive) and then writes the numbers to a file. Each number in the file should be separated by a | symbol with five numbers per line. No line should begin or end with a | symbol. The program should also write control totals on the last 2 lines of the file, the second last line showing the average number generated, and the last line showing the number(s) that were generated the least amount of times.

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!