C++

Copy Code

int arry[18] = { 16,24,55,25,41,63,90,62,42,28,99,86,13,83,33,91,58,16 }; int i, min, max, sum, count; min = arry[0]; max = arry[0]; sum = 0; count = 0; for (i = 0; i < 18; i++) { if (min > arry[i]) { min = arry[i]; } if (max < arry[i]) { max = arry[i]; } if (arry[i] >= 50) { count++; } sum += arry[i]; } int avg = sum /18; // print the results here.