Two questions, why doesn't my program let me keep putting in numbers until I guess the right one?

What is wrong with my loop? Pressing 1 should repeat the program, any other number should close.
...