Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
100686 | 谭思宸 | 13分苹果 | C++ | Compile Error | 0 MS | 0 KB | 170 | 2024-12-10 20:35:47 |
#include<iostream> using namespace std; int main() { int n;sum=0; int i; cin>>n; for(i=1;i<=n;i++) sum+=i; cout<<sum<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:10: error: 'sum' was not declared in this scope int n;sum=0; ^