Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6842 吴承熹 计算平均数 C++ Wrong Answer 0 MS 268 KB 550 2025-03-22 13:58:53

Tests(0/10):


Code:

#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(){ int n=0,a[6]; double s; for(int i=1;i<=5;i++){ cin>>a[i]; n=n+a[i]; } s=n/5.0; cout<<fixed<<setprecision(2)<<s<<endl; for(int i=0;i<=5;i++){ if(a[i]>s){ cout<<a[i]<<" "; } } return 0; }


Run Info:

------Input------
986 438 342 699 699
------Answer-----
632.80 986 699 699
------Your output-----
632.80 1343103032 986 699 699