Control flow troubles

I do appreciate your effort and promise next time I paste my code I'll autoformat it beforehand.