Arithmetic Operators Flashcards
1
Q
+
A
Addition,Adds together two values x + y
2
Q
-
A
Subtraction,Subtracts one value from another x - y
3
Q
*
A
Multiplication, Multiplies two values x * y
4
Q
/
A
Division, Divides one value by another x / y
5
Q
%
A
Modulus, Returns the division remainder x % y
6
Q
++
A
Increment, Increases the value of a variable by 1 ++x
7
Q
–
A
Decrement, Decreases the value of a variable by 1 –x
8
Q
=
A
assignment operator, assign the value int x = 10;
9
Q
+=
A
addition assignment operator, adds a value int x = 10;
x += 5;