Increment and assignment

var++;          // Increment var by 1
int i = var;    // Assign var to another variable

Arithmetic and compound operators

int a = 10, b = 3;
int sum_ab = a + b;
int diff_ab = a - b;
int mul_ab = a * b;
int div_ab = a / b;
int mod_ab = a % b;
 
a += 2; // a = a + 2
b *= 2; // b = b * 2

Logical and comparison operators

bool result = (a > b) && (b != 0); // Logical and comparison operators

Note

The most common logical and comparison operators are: >, <, >=, <=, ==, !=, &&, ||, !.

Next: Control Flow