Question: Write a java program named RandomNumberArray.java that accepts 3 numbers, N, L, and U from the Cmd argument list. Use these three numbers to perform
Write a java program named RandomNumberArray.java that accepts 3 numbers, N, L, and U from the Cmd argument list. Use these three numbers to perform the following tasks:
1. The first number N specifies the number of int array in your program, create an int array with the size of N
2. Generate random numbers between L and U and assign the random numbers to each of the element in the array you defined in step 1
3. Calculate the average of the array elements
4. Count how many array elements are below the average, above average, and equal to average
5. Display results in the format as shown below:
Average = 50
20 elements are below the average
28 elements are above the average
2 elements are equal to the average
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
