Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1580 | 莫业祁 | 12for循环练习I | C++ | Compile Error | 0 MS | 0 KB | 142 | 2023-10-28 17:09:03 |
# include<iostream> using namespace std; int main(){ int n; cin>>n; for(int i=1;i<=n:i++); cout<<i<<endl return 0; }
Main.cc: In function 'int main()': Main.cc:7:21: error: found ':' in nested-name-specifier, expected '::' for(int i=1;i<=n:i++); ^ Main.cc:7:20: error: 'n' is not a class, namespace, or enumeration for(int i=1;i<=n:i++); ^ Main.cc:7:25: error: expected ';' before ')' token for(int i=1;i<=n:i++); ^ Main.cc:8:11: error: 'i' was not declared in this scope cout<<i<<endl ^ Main.cc:9:1: error: expected ';' before 'return' return 0; ^