Sunday, March 12, 2017

C++ Part 17

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:

If one operation is performed before another, the operation that is performed first
is said to have higher precedence.

No comments:

Digital Design Part 3

4th→ assembler translates it to the machine language. 1.6 [20] <§1.6> Consider two diļ¬€erent implementations of the same instru...