Problem duckhunt12
User chikin
Submission Time 2025-06-18 17:00:06
Score 0
Max Time N/A
Max Memory N/A

Compile Error

duckhunt12.cpp: In function ‘int main()’:
duckhunt12.cpp:9:5: error: expected ‘,’ or ‘;’ before ‘bool’
9 | bool directionX = true;
| ^~~~
duckhunt12.cpp:13:15: error: expected ‘;’ before ‘}’ token
13 | time++
| ^
| ;
14 | }
| ~
duckhunt12.cpp:15:12: error: ‘directionX’ was not declared in this scope; did you mean ‘directionY’?
15 | if(directionX){
| ^~~~~~~~~~
| directionY
duckhunt12.cpp:16:20: error: expected ‘)’ before ‘n’
16 | if(x ++ n){
| ~ ^~
| )
duckhunt12.cpp:29:32: error: expected ‘)’ before ‘n’
29 | if(y ++ n){
| ~ ^~
| )