What does the % in a calculation? I can\'t seem to work out what it does.
%
Does it work out a percent of the calculation for example: 4 % 2
4 % 2
The % (modulo) operator yields the remainder from the division of the first argument by the second. The numeric arguments are first converted to a common type.
3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6 = 7
This is based on operator precedence.