Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5091 | 张文曦 | 计算平均数 | C++ | Wrong Answer | 0 MS | 268 KB | 503 | 2024-11-02 14:10:39 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<iomanip> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double a[5],n=0,d; for(int i=0;i<5;i++){ cin>>a[i]; n=n+a[i]; } n=n/5; cout<<fixed<<setprecision(2)<<n; for(int i=0;i<5;i++){ if(a[i]<d) cout<<a[i]<<' '; } return 0; }
------Input------
986 438 342 699 699
------Answer-----
632.80 986 699 699
------Your output-----
632.80