Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
5900 | 谢锦卓 | 13自由落体 | C++ | Compile Error | 0 MS | 0 KB | 264 | 2024-12-21 09:23:27 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() using namespace std; int main(){ float h=100; double n=100; for(int i=1;i<=10;i++){ h=h/2; z=z+(h*2); } printf("%.6lf\n",z); return 0; }
Main.cc: In function 'int main()': Main.cc:9:9: error: 'z' was not declared in this scope z=z+(h*2); ^ Main.cc:11:22: error: 'z' was not declared in this scope printf("%.6lf\n",z); ^ Main.cc:6:12: warning: unused variable 'n' [-Wunused-variable] double n=100; ^