:( Yea,it is modulo division, and it gives the remainder when divided.. I checked the boolean values for all 3 and got their difference. Anyway Thank You.
The % operator is commonly called the "modulo" operator, however it can be argued that it is more mathematically accurate to call it the "remainder" argument. Regardless, I think @weaknessforcat s was asking you what it means when a%2 is equal to 0. What does that tell you about a and 2?
By the way, when considering a%b, it is helpful if you are certain that both a and b are greater than 0. The results are counter-intuitive for negative operands; Zero is not allowed for b; and 0 % b is 0 for all nonzero b. the modulo and remainder arguments give the same results for positive operands, but results differ for negative operands. - but this is a pedantic distinction of no relevance to your original question.
Last edited by donbock; Mar 2 '14, 04:39 AM.
Reason: Added pedantic reference to modulo vs remainder.
Comment