17-12-15

#include

int main(){
    int a[5]={};
    int i;
    int sum=0;
    double ave=0.0;
    printf("请输入5个数:\n");
    for (i=0;i<5;i++){
        scanf("%d",&a[i]);
        sum+=a[i];
    }
    ave=sum/5;
    for (i=0;i<5;i++){
        if(a[i]>ave){
            printf("%d\n",a[i]);
        }
    }
    return 0;
}

你可能感兴趣的:(17-12-15)