int main(void){
int a[8];
int max,pingjun,sum=0;
for (int i=0; i<8;++i ) {
scanf("%d",&a[i]);
sum+=a[i];
}
max=a[0];
pingjun=sum/8;
for (int k=1; k<8; ++k) {
if (a[k]>max) {
max=a[k];
}
}
printf("%d\n",max);
printf("%d\n",pingjun);
return 0;
}
请采纳谢谢!不懂再问