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

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

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 Databases Questions!