思路:
注意:若初始化min=0.0则可能最小值就是0了!!!
int main(void)
{
int n = 0, i = 0;
float x = 0.0f;
scanf("%d", &n);
float max = 0.0f;
float sum = 0.0f;
float min = 0.0f;
for (i = 0; i < n; i++)
{
scanf("%f", &x);
if (i == 0)
min = x;
if (max < x)
max = x;
if (min > x)
min = x;
sum += x;
}
sum /= 5;
printf("%.2f %.2f %.2f", max, min, sum);
return 0;
}