Problem stepcount
User ryoshu
Submission Time 2026-11-04 10:11:47
Score 0
Max Time N/A
Max Memory N/A

Compile Error

stepcount.cpp: In function ‘int main()’:
stepcount.cpp:11:9: error: ‘else’ without a previous ‘if’
11 | else if (N%3 == 3) {
| ^~~~
stepcount.cpp:12:13: error: ‘stepnum’ was not declared in this scope; did you mean ‘stepNum’?
12 | stepnum += 3
| ^~~~~~~
| stepNum
stepcount.cpp:17:13: error: ‘stepnum’ was not declared in this scope; did you mean ‘stepNum’?
17 | stepnum += 1;
| ^~~~~~~
| stepNum
stepcount.cpp:21:24: error: expected ‘;’ before ‘{’ token
21 | else (N%3 == 1) {
| ^~
| ;