#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
int x, cnt = 0, number[100];
double sum = 0;
scanf("%d", &x);
while (x != -1) {
number[cnt] = x;
sum += x;
cnt ++;
scanf("%d", &x);
}
if (cnt > 0) {
printf("%f\n", sum / cnt);
int i;
for (i = 0; i < cnt; i++) {
if (number[i] > sum / cnt) {
printf("%d\n", number[i]);
}
}
}
return 0;
}
7/16/2019
在下才疏学浅,有不足之处,望各位海涵!