And I'm confused if the program would work in the way I'm expecting it to. I'm expecting the program to work on all the statement below that mark again and again until statement4 is no longer true.
And all my confuse came from my lack of understanding on how goto statement really work. Is it simply go to that line and run, which is a bad statement because the structure would be not complete, or is it load the structure where the mark is located and run from that mark forth?
For future reference, goto statements are very bad programming practices. there is almost always a better way of solving. For example you could put this in a function and re-call itself whenever statement 4 is correct.
Indentation helps make things clearer, there are plenty of sources if you search for them, and different styles of doing it, but essentially your code would be less confusing if it was written like this:
learn how to use while/for loops, 1000% better than goto, and learn about "else if" as well, doing else and then if on another line is a waste of a line.
OK, thanks for everyone, but I'm not stupid enough to be unaware of for loop or while loop or that shiny else if. And I don't use them for a reason. And I know that 'goto' command is what every programmer should avoid, but again, I use it for a reason.
As for the problem itself. I tested and find the result seemingly like this: the if - else structure form line 8 to line 15 will be ran.but code for will be totally skipped, seemingly because that else is part of the if statement, and won't be run when the 'if' statement is ran. I use seemingly, because I don't know how those statements really work. I simply did the experiment and checked the result.
As those single "}" brackets might be confusing. I suggest any one who do have to use the "goto" statement place the marks out side of all structure, perhaps on the first layer of the function. And my example on top, that is a typical go-home-and-do-it-again example.
And again, it's only a suggestion. I don't know how those statements really work, and actually I was expecting someone who know to answer me. But... it's OK. Like people said, avoid it if you can. And don't use it before you know what you actually are doing. Do some little test on it first, because it can be really confusing before you know what it really is.