Comp 110 Math Operators

+ Addition

- Subtraction

* Multiplication

/ Division

% Remainder ("Modulus")

Modulus is the least intuitive of the Math Operators. Take a look below for some examples of modulus. Keep in mind that the below is not java code, but mathematical equations. 

1 % 3 = 1
2 % 3 = 2
3 % 3 = 0
4 % 3 = 1
//...etc

So modulus will attempt to divide the left-hand number by the right-hand number, and the value that remains is what modulus returns.