Description | Operator | Example |
---|---|---|
Addition | + | 7 + 8 |
Subtraction | - | 34 - 12 |
Multiplication | * | 3 * 5 |
Division | / | 42 / 6 |
Modulus (Remainder) | % | 13 % 6 (returns 1, as 6 goes into 13 twice, leaving 1 as the remainder ) |
Exponential | ** | 4 ** 2 (returns 16 or 4 * 4) |
Increment | ++ | 9++ (returns 10) |
Decrement | -- |
37-- (returns 36) |
Examples