Led keeps on after statement is reached

AngelinaNoLee:
... I cant do more auto formatting

Why not. It takes a fraction of a second to do Ctrl+t. Are you really so lazy?

AngelinaNoLee:
this is what the compiler does

Wrong. You're the one who failed to properly format your code. The compiler has absolutely nothing to do with code formatting.

AngelinaNoLee:
pls stop posting this its irrelevant.

If you want me to stop then just do an auto format on your code before posting it to the forum.