| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 123012 | 陈淮遇 | 12奇数和与偶数和 | C++ | Compile Error | 0 MS | 0 KB | 177 | 2025-06-22 13:31:36 |
#include<bits/stdc++.h> using namespace std; int main() { int a; for (int a = 1; a < 21; a++) { if (a % 3 == 0) { s = s + a; } } cout << s; return 0; }
Main.cc: In function 'int main()':
Main.cc:7:4: error: 's' was not declared in this scope
s = s + a;
^
Main.cc:10:10: error: 's' was not declared in this scope
cout << s;
^
Main.cc:4:6: warning: unused variable 'a' [-Wunused-variable]
int a;
^