void main() {
    int[] scores = {88, 92, 79, 95};

    int total = 0;
    int largest = scores[0];
    int smallest = scores[0];
    for (int score : scores) {
        total += score;
        if (score > largest) {
            largest = score;
        }
        if (score < smallest) {
            smallest = score;
        }
    }

    IO.println(scores.length);
    IO.println(total);
    IO.println(largest);
    IO.println(smallest);
    IO.println((double) total / scores.length);
}

// From Groundwork, chapter 7 (ch07-arrays-and-lists), box 10.
// This example is from Groundwork, licensed CC BY-NC-SA 4.0.
// Run with: java ch07_10.java
