#include<stdio.h> int main() { int n; scanf("%d", &n); float score[100] = {0}; float max = 0.0; //如果比给的最大值还要大,那必然是最大值所以此处设0 float min = 100.0; //如果比给的最小值还要小,那必然是最小值所以此处设100 float sum = 0.0; float avg = 0.0; int i![;alt] for (i = 0; i < n; i++) { scanf("%f", &score[i]); sum += score[i]; avg = sum / n; if (score[i] > max) { max = score[i]; } if (score[i] < min) { min = score[i]; }

}
printf("%.2f %.2f %.2f", max, min, avg);

} alt