[Solved] how many condition can be declared in do while? [closed]


In C++ (and many other languages), operator && is a logical AND operator, which yelds true only when both conditions are true. If any of the conditions is false, the whole statement is false.

The code executes once because the do while loop actually tests the condition at the end, after executing. If you would use a while or for loop here, the code inside wouldn’t be executed at all.

If you want to test if any of the conditions are true, use operator || instead, which is the logical OR operator. Here’re truth tables for both of the operators, taken from one of University of Florida sub-pages.

enter image description here

solved how many condition can be declared in do while? [closed]