Question: Im having trouble getting my program to work. i keep getting an error when trying to include the mean into my standard deviaiton method. Write

Im having trouble getting my program to work. i keep getting an error when trying to include the mean into my standard deviaiton method.

Write a program that prompts the user for 10 floating point values. The program should invoke two methods to calculate the mean and standard deviation of the numbers. You can use the formula below to calculate the mean and standard deviations.

You will need:

A scanner object to read the 10 values

An array to store the ten values

Two methods that do the following:

Accepts an array and returns the mean

Accepts an array and returns the standard deviation

Im having trouble getting my program to work. i keep getting an

A sample of the output is shown below

Enter ten numbers: 1.9 2.5 3.7 2 1 6 3 4 5 2 The mean is 3.1100000000000003 The standard deviation is 1.5573838462127583

System. out. println the mean is mean (list2 System. out. println the standard deviation is SD (list2 public static double mean (double array) calculates mean and returns value double sum 0; for int i 0 i Karray length itt) sum array [i] return sum array length; public static double SD double array) calculates standard deviation double d 0 for (int i 0: i

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!