< Previous | Contents | Next >

Adding, Subtracting, and Multiplying

I use the built-in arithmetic operators for addition (the plus sign, þ), subtraction (the minus sign, -), and multiplication (an asterisk, *). The results depicted in Figure 1.4 are just what youd expect.

Each arithmetic operator is part of an expressionsomething that evaluates to a single value. So, for example, the expression 7 þ 3 evaluates to 10, and thats what gets sent to cout.