Mixing arithmetic operators (cont'd)
(Display Figure 3.)
Figure 3 contains two statements.
Each statement evaluates an arithmetic expression using:
- The current values of the variables a and b
- The
literal constant 3.
The expressions also include:
- The addition
operator (+)
- The multiplication operator (*).
Given the values shown for the two variables
- The result of evaluating the arithmetic expression in the first statement would
be 21.
- The result of evaluating the arithmetic expression in the second
statement would be 11.