Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
92901 吴诗涵 计算平均数 C++ Accepted 1 MS 272 KB 268 2024-10-06 18:51:02

Tests(10/10):


Code:

#include<iostream> using namespace std; int main(){ int a[5],m; float p; for(int i=0;i<5;i++){ cin>>a[i]; } p=(a[0]+a[1]+a[2]+a[3]+a[4])/5.0; printf("%.2f\n",p); for(int i=0;i<5;i++){ if(a[i]>p){ cout<<a[i]<<" "; } } return 0; }