The algorithm works out the total and average of all of the values entered that are in the range of 1-10, then output the number of values in the range, the total and the average.
Explanation:
Below is the pseudocode for 15 numbers :
public class JavaExample {
public static void main(String[] args) {
double[] arr = [15];
double total = 0;
for(int i=0; i<arr.length; i++){
total = total + arr[i];
}
double average = total / arr.length;
System.out.format("The average is: %.3f", average);
}
}