Guided Notes
Operators & Booleans
Arithmetic, assignment, comparison, and logical operators; the bool type and boolalpha; short-circuiting; and precedence.
Arithmetic and assignment
Slide 1 / 5| Operator | Example (a = 17, b = 5) | Result |
|---|---|---|
| + - * | a * b | 85 |
| / | a / b (ints) | 3 |
| % | a % b | 2 |
| ++ -- | a++ | a becomes 18 |
| += -= *= /= %= | a += 3 | a becomes 20 |
