Boolean Expressions
A Boolean expression is any expression that is either true or false.AND Example
(2 < x) && (x < 7)
|
And Example with IF AND ELSE
if ( (score > 0) && (score < 10))
cout << "score is between 0 and 10.\n";
else
cout << "score is not between 0 and 10.\n";
|
OR Example
(y < 0)||(y < 12)
|
Precede Order:
is said to have higher precedence.
No comments:
Post a Comment