Evaluate the following conditional expressions in a step-by-step manner as shown in the examples when x = 1 and y = 2.
Note: In the solutions below, indicate the current logical expression being evaluated according to the rules of precedence.
```
y-3 = 0 ORx-3 =0 ANDy=2
```
Evaluates as False
Assign Values 2 — 3 = 0 OR 1 — 3 = 0 AND 2 = 2
Add Parentheses ((2 — 3) = 0) OR ((1 — 3) = 0) AND (2 = 2)
Do Arithmetic (-1 = 0) OR (-2 = 0) AND (2 = 2)
Evaluate Relational Exp. F OR F AND T
Evaluate Logical Exp.
AND First F OR F AND T = F OR F
OR Next F OR F = F
Get Result FALSE
You might also like to view...
Consider the class definition:
``` class IntPair { int first; int second; public: IntPair(int firstValue, int secondValue); // prefix operator++ here // postfix operator ++ here int getFirst( ) const; int getSecond( ) const; }; ``` a) Give declarations for prefix and postfix versions of operator++ b) Give definitions for prefix and postfix versions of operator++
The following code should output the even integers from 2 to 100:
``` unsigned int counter{2}; do { cout << counter << endl; counter += 2; } While (counter < 100); ```