C++ infinite loop
问题 I am attempting to write a loop that will repeat until the user enters one of the correct choices (either 1 or 0). For some reason when I have the loop written as below it creates an infinite loop. I am intending for the loop to only execute while control is not 0 OR not 1, but for some reason it will always execute and becomes an infinite loop. cout<<"Please enter 1 for another customer or 0 to quit : "; cin>>control; while ((control != 0 )|| (control != 1)) { cout<<"Invalid Entry! Please