Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
5370 邓小龙 计算平均数 C++ Accepted 0 MS 268 KB 524 2024-11-14 11:30:40

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(){ int a[5]; int s=0; for(int i=0;i<5;i++){ cin>>a[i]; s+=a[i]; } double ave=s/5.0; printf("%.2lf\n",ave); for(int j=0;j<5;j++){ if(a[j]>ave){ cout<<a[j]<<' '; } } return 0; }