From what I can figure, if my variable (total) divided by 3 is equal to 2 then the expression is true correct?
In C/C++, the percentage is modulus. With the modulus operator, the remainder of a division is its return value. That said, if the remainder of the division is equal to 2, then the expression is true. Otherwise, it's false.
The modulus operator returns the remainder of a division, not the amount of times the left-hand operand went into the right-hand operand (an operand is a piece of data on either side of an operator). For instance, 11 / 3 is two. Here's why:
11 - 3 = 8
8 - 3 = 5
5 - 3 = 2
2 - 3 = ??
The last calculation can't be done because 3 is greater. Because we can no longer divide 2 by 3, 2 becomes the remainder.