| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 164904 | 计算平均数 | C++ | Compile Error | 0 MS | 0 KB | 284 | 2026-11-07 20:20:20 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[5],d,f=0; for(int i=1;i<=5;i++){ cin>>a[i]; f+=a; }d=f/5; printf("%.2d",d); cout<<endl; for(int i=1;i<=5;i++){ if(a[i]>d){ cout<<a[i]<<" "; } } }
Main.cc: In function 'int main()':
Main.cc:7:10: error: invalid use of non-lvalue array
f+=a;
^
Main.cc:7:10: error: in evaluation of 'operator+=(int, int [5])'