Question: Write a Java code snippet to declare an array of 100 doubles. Use a for loop to initialize the array with random numbers (use Math.

Write a Java code snippet to declare an array of 100 doubles. Use a for loop to initialize the array with random numbers (use Math. random) between 1 and 100. Write a Java code snippet that uses a while loop to print the values in the array from #1 above to the command line. Write a Java code snippet to find the average of the values in the array from #1. Print the average to the command line
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
