Arithmetic Operators

int myNum = 100 + 50;
int sum1 = 100 + 50; // 150 (100 + 50)
int sum2 = sum1 + 250; // 400 (150 + 250)
int sum3 = sum2 + sum2; // 800 (400 + 400)

Operator Name Example
+ Add x + y
- Subtract x - y
* Multiply x * y
/ Divide x / y
% Modulo x % y
++ Increment ++x
-- Decrement --x
Comments