Nested while loop problem
in
Programming Questions
•
3 years ago
Hi all,
I have an issue, It goes a little something like this:
while(true){
while(a && !b && !c){ // nested 1
while(a && b && !c){ // nested 2
while(a && b && c){ // nested 3
Do stuff!
}
}
}
}
a, b and c are user inputs and any combination of them can be true at any time,
I'm looking for the correct combination from the user...
Am I right in thinking that when the code gets to nested loop 2 as soon
as b becomes true I will get kicked out of nested loop 1 as !b is no longer satisfied?
I have it running on a separate thread as I want it to always be checking this,
the program has reached ''do stuff! but it is seldom an occurrence.......
If anyone has a fix or alternative please help

P.S. This is my first post, so bare with me if I am breaking any forum rules..

1