Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98111 | 李谨睿 | 计算平均数 | C++ | Accepted | 0 MS | 272 KB | 288 | 2024-11-17 12:50:36 |
#include<bits/stdc++.h> using namespace std; int main(){ float d=0,b=0; int a[5]; for(int i=0;i<=4;i++){ cin>>a[i]; } for(int i=0;i<=4;i++){ b=b+a[i]; } d=b/5; printf("%.2f\n",d); for(int i=0;i<=4;i++){ if(a[i]>d){ cout<<a[i]<<" "; } } return 0; }