+ 1
What does this % really do ...?
question
5 odpowiedzi
+ 2
That's a modulo operator, it returns the remainder of a division operation eg
4÷2=2
4%2=0
+ 7
It is the modulo operator.
m%n will return the remainder of m/n.
E.g.
3%2 = 1
2%2 = 0
5%3 = 2
+ 2
are you saying it only gives the remainder of a division operation
+ 1
That is exactly what Hatsy is saying
+ 1
calculate the reminder