Learn to debug. It is simple, and the time investment pays of immediately. I understand that it might seem like "I have a lot to learn, so I will put that off and learn it later - for now I just want my program working", but that is a REALLY bad idea. Debugging saves time from day one. You should consider 90% or more of your learning time wasted until you spend 15 minutes learning how to use the debugger). Here are the docs from Microsoft, but you can easily google tutorials, youtube videos, or whatever you prefer learning from:
First look at the debugger - Visual Studio | Microsoft Docs[
^]
The debugger will allow you to step through your loop line by line, allowing you to see the values of each variable - and even evaluate the entire expression in the while loop. No more guessing what is happening, you can see exactly what happens and why.
In your case, you would see
failResult != resultNumber && failResult != wrongResult
never change value. If it is true the first time the code is executed, it will be true the second time. When using a while loop, you need something inside the loop that changes the variables the loop condition use.
Another small side note: The task manager can stop your program without turning the computer off. And if you use a debugger, you do not even need that. Just stop debugging. :)