int[] scores = {85, 92, 78, 90};
int total = 0;
for (int i = 0;
        i < scores.length;
        i++) {
    total += scores[i];
}
double avg = (double) total
    / scores.length;
