C++ 代码
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n;
int main()
{
cin >> n;
double sum = 0;
int max = -0x3f3f3f3f;
int min = 0x3f3f3f3f;
for(int i = 0; i < n; i++)
{
int num;
cin >> num;
sum += num;
if (num > max) max = num;
if (num < min) min = num;
}
cout << max << endl << min << endl;
printf("%.2lf\n", sum/n);
return 0;
}