int main() { double a[10], max, min; int i; for (i = 0; i < 10; ++i){ scanf ("%lf", &a[i]); } max = min = a[0]; for (i = 1; i < 10; ++i){ if (max < a[i])max = a[i]; if (min > a[i])min = a[i]; } printf ("max=%f, min=%f, avg=%f\n", max, min, (max+min)/2.0); return 0; }