Let's say x=29 and y=13. What does this line of code actually do:
x%=y-3;
I just don't really know what does this mean?
Let's say x=29 and y=13. What does this line of code actually do:
x%=y-3;
I just don't really know what does this mean?
Modulo operator gives you remainder from division.
a % b
is the remainder of division a by b
x %= y - 3
is equal to x = x % (y - 3)
and gives you remainder from division x by (y - 3) expression.