| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 63047 | W3103764430 | [在线测评解答教程] 求和 | C++ | Compile Error | 0 MS | 0 KB | 75 | 2024-01-03 20:11:32 |
int sum = 0; for(n=1;n<1001;n++){ sum=sum+n; } cout<<sum<<endl;
Main.cc:2:1: error: expected unqualified-id before 'for'
for(n=1;n<1001;n++){
^
Main.cc:2:9: error: 'n' does not name a type
for(n=1;n<1001;n++){
^
Main.cc:2:16: error: 'n' does not name a type
for(n=1;n<1001;n++){
^
Main.cc:5:5: error: 'cout' does not name a type
cout<