Can someone please explain to me why this break code connects to another block of code and what I can do to resolve this? I'm kinda new to programming. I've tried rearranging it but it doesn't execute the other code. The error message says "unreachable statement."
Asked
Active
Viewed 20 times
0
-
1you forgot to include the code – jeekiii Jul 09 '22 at 20:12
-
Do not use control structures like `if`, `for` and `while` without curly braces, it might mislead you in the beginning of programming where blocks start and end. You have a `break` statement which leaves some block (we can't see), so any code inside the current block after the `break` statement is "unreachable", hence the error message. – Progman Jul 09 '22 at 20:53
-
[Please do not upload images of code/errors when asking a question.](https://meta.stackoverflow.com/q/285551) – Progman Jul 09 '22 at 21:13
-
Please provide enough code so others can better understand or reproduce the problem. – Community Jul 10 '22 at 10:05