Question: java language please! Problem #2: (20 pts] Write a Java program that prompts the user to enter N numbers and stores them in an array,

java language please! Problem #2: (20 pts] Write a Java program thatjava language please!

Problem #2: (20 pts] Write a Java program that prompts the user to enter N numbers and stores them in an array, then finds the average. For example, if the input values are 6, 2.8 and 9.2, then the average is (6 +2.8 +9.2)/3 =6. The program should display the difference between the average and each clement in the array. Sample run 1 : Enter N: 3 Enter the numbers: 6 2.8 9.2 The average is 6.0 6.0 - 6.0 = 0.0 6.0 - 2.8 - 3.2 6.0 9.2 - -3.19999999 Sample run 2: Enter N: 4 Enter the numbers: 1 2 3 7 The average is 3.25 3.25 - 1.0 = 2.25 3.25 2.0 -1.25 3.25 3.0 - 0.25 3.25 7.0 = -3.75

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!