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

Compile Error

stepcount.cpp: In function ‘int main()’:
stepcount.cpp:10:5: error: ‘else’ without a previous ‘if’
10 | else if (N%3 == 3) {
| ^~~~
stepcount.cpp:11:9: error: ‘stepnum’ was not declared in this scope; did you mean ‘stepNum’?
11 | stepnum += 3
| ^~~~~~~
| stepNum
stepcount.cpp:13:9: error: break statement not within loop or switch
13 | break;
| ^~~~~
stepcount.cpp:16:9: error: ‘stepnum’ was not declared in this scope; did you mean ‘stepNum’?
16 | stepnum += 1;
| ^~~~~~~
| stepNum
stepcount.cpp:18:9: error: break statement not within loop or switch
18 | break;
| ^~~~~
stepcount.cpp:20:20: error: expected ‘;’ before ‘{’ token
20 | else (N%3 == 1) {
| ^~
| ;