This code might be a bit vague, but this question is regarding an assignment I have to turn in and will be checked for plagerism so I will just give the jist of my problem.
bool x = false;
while (x == false)
{
}
if (conditions)
{
x = true;
}
while (x == true)
{
if (a == b)
{
//....
}
else
x = false;
}
I know this code might be confusing but I'll try my best to explain my problem:
Everything runs fine minus the last part. In my second while loop the condition is x == true, but if the conditions of the if statement (within the while statement) arent satisfied, I want x == false, and I want it to go back to the first while loop for the condition x==false. However, it sets x == false, then ends the program.
Any help is appreciated.