What is the meaning of %?


#1

Hi there, I’m super new in coding and I don’t get what the meaning is of %.

for example 19 % 4 gives 3
and 10 % 10 gives 0
and 10 % 100 gives 10
but then 100 % 10 gives again 0

I can´t figure out what % does in these cases. Who could help me out?


#2

its the modulo operator, it gives you the remainder of the division.


#3

yes! Got it. It all makes sense again


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.