Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
103149 黄思翔 计算平均数 C++ Wrong Answer 1 MS 276 KB 323 2024-12-28 12:13:12

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n=5; int a[n]; for(int i=0;i<=4;i++){ cin>>a[i]; } int b=0; for(int i=0;i<=4;i++){ b=b+a[i]; } cout<<b; float c; c=b*1.0/n; printf("%.2f\n",c); for(int i=0;i<=4;i++){ if(a[i]>c){ cout<<a[i]<<" "; } } return 0; }


Run Info:

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