| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 78680 | 李君彦666 | 数组输出 | C++ | Compile Error | 0 MS | 0 KB | 332 | 2024-06-23 20:13:43 |
#include<iostream> #include<iomanip> using namespace std; int main() { int a[10] = {0}; double s = 0; for (int i = 0; i <=4; i++) { cin>>a[i]; s += a[i]; } delete avg = s/5.0; cout<<fixed<<setprecision(2)<<avg<<endl; for (int i = 0; i <=4; i++) { if(a[i]>acg){ cout<<a[i]<<" "; } } }
Main.cc: In function 'int main()':
Main.cc:14:9: error: 'avg' was not declared in this scope
delete avg = s/5.0;
^
Main.cc:17:11: error: 'acg' was not declared in this scope
if(a[i]>acg){
^