Given an array of doubles named values, what does the following code do?
double total = 0; for(double element : values) { total = total + element; } double average = 0; if (values.length > 0) { average = total/values.length; }
There are no hints for this question