提交时间:2019-11-29 19:50:59
运行 ID: 2528
#include<iostream> using namespace std; int main(){ int n; double sum=0,avg; int c[101]={0}; cin>>n; for(int i=1;i<=n;i++){ cin>>c[i]; sum+=c[i]; } avg=sum/n; printf("%.1lf\n",avg); for(int i=1;i<=n;i++){ if(c[i]>avg){ cout<<i<<":"<<c[i]<<" "; } } return 0; }