Complete the code to check if both conditions are true.
bool result = (a > 5) [1] (b < 10);
The logical AND operator && returns true only if both conditions are true.
Complete the code to check if either condition is true.
bool result = (x == 0) [1] (y != 0);
The logical OR operator || returns true if at least one condition is true.
Fix the error in the condition to correctly negate the expression.
if ([1]) { // do something }
The logical NOT operator ! negates the boolean value of flag.
Fill both blanks to create a condition that is true only if a is positive and b is not zero.
if ((a [1] 0) [2] (b != 0)) { // code here }
The condition checks if a is greater than zero and b is not zero using logical AND &&.
Fill all three blanks to create a condition that is true if x is zero or y is positive and z is false.
if ((x [1] 0) [2] (y [3] 0 && !z)) { // action }
The condition checks if x equals zero or (y is greater than zero and z is false).
