Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98922 罗迎甲 计算平均数 C++ Wrong Answer 1 MS 272 KB 639 2024-11-23 17:44:01

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int s[5]; int a; double z; for(int i=0;i<5;i++){ cin>>s[i]; z+=s[i]; } printf("%.2lf\n",z/5); for(int a =0 ;a<5;a++){ if(s[a]>(z/5)) { cout<<s[a]<<" "; } } return 0; }


Run Info:

------Input------
679 849 98 256 256
------Answer-----
427.60 679 849
------Your output-----
-nan