#include <stdio.h>
int main() {
int N;
scanf("%d", &N);
int score, sum = 0;
int max = -100, min = 100;
for (int i = 0; i < N; i++) {
scanf("%d", &score);
sum += score;
if (score > max){
max = score;
}
if (score < min){
min = score;
}
}
int result = (sum - max - min) / (N-2);
printf("%d", result);
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: