0
watch does %? example. x%=6. Answer 3
2 Answers
+ 4
The % stands for modulo.
It's the remainder of a division.
6/4 does not work to get an interger, but 4/4 does. So
6-4 = 2
6%4 =2
+ 4
% modulos gives the remainder of the division only.
Andreas example is self-explaintry
5/5 = 1
6/5= 1
7/5= 1
because "/" only gives the integer output that is 1
while "%" gives just the remainder
5%5= 0
6%5= 1
7%5= 2