Something can only be said to work/not work if it actually runs.
It can only run if it compiles, which because of the lack of a closing brace } before the else, your code cannot.
Something can only be said to work/not work if it actually runs.
It can only run if it compiles, which because of the lack of a closing brace } before the else, your code cannot.