| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 129899 | 王丞杰 | 计算平均数 | C++ | Compile Error | 0 MS | 0 KB | 254 | 2025-09-06 17:30:09 |
#include<bits/stdc++.h> using namespace std; int a[10]; int main() { double sum=0,avg; for(int i=1;i<=5;i++){ cin>>a[i]; sum += a[i]; } avg = sum/0.5; print("%.2lf\n",avg); for(int i=1;i<=5;i++){ if(a[i]>avg){ cout<<a[i]<<" "; } } }
Main.cc: In function 'int main()':
Main.cc:11:20: error: 'print' was not declared in this scope
print("%.2lf\n",avg);
^