Showing posts with label Input. Show all posts
Showing posts with label Input. Show all posts

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.

Saturday, March 11, 2017

Intro to C++ Part 4


  • Declaration of variables: How does the variable map onto memory? Updating variable: How do we update the variable, and what do we update it with? 
  • I/O: How do we input and output data into the system? 
  • Control: How do we control which statement gets executed next? 
  • Modularity and Object Orientation: How do we organize the program to enable proper software engineering practices? 
  • Comments: Used to describe code; ignored by compiler, but code unmaintainable without good comments! C/C++: on line beginning with // or surrounded by /*, */

Digital Design Part 3

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