Best writers. Best papers. Let professionals take care of your academic papers

Order a similar paper and get 15% discount on your first order with us
Use the following coupon "FIRST15"
ORDER NOW

Write a method that computes the average of the values in an array of doubles

Write a method that computes the average of the values in an array of doubles.

The header of the method is as follows:

public static double average(double[] x)

Ans: Is this correct?

public static double average(double [] x)

{

double ;

for( int ;i<x.length ;i++)

{

sum+[i];

}

return (sum/x.length);

}

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"