Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139874 何旻慧 计算平均数 C++ Accepted 0 MS 272 KB 536 2025-12-10 19:49:33

Tests(10/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(){ double n; int s[5],m=0; for(int a=0;a<=4;a++){ cin>>s[a]; } for(int a=0;a<=4;a++){ m+=s[a]; } n=m*1.0/5; printf("%.2lf \n",n); for(int a=0;a<=4;a++){ if(s[a]>n) cout<<s[a]<<" "; } return 0; }