There is one more arithmetic operator which is probably less familiar to you. The
%symbol is used to represent the remainder operation.
X % Yis the remainder of dividing
Y. For example
314 % 100is
10 % 3is
144 % 12is
0. Remainder has the same precedence as multiplication and division.
I don't understand, why it multiply the remainder fraction by divisor (after division). It is more complicated or less accurate.
10 / 3 = 3.3333 (a recurring decimal number). 10 % 3 = 1 (0.333 * 3 = 0.999 (not 1 )
What is purpose of this strange remainders ?