0
Can someone explane to me how % works?
3 Réponses
+ 2
8 modulo 5 or 8%5. 5 goes into 8 one time with a remainder of 3. So 3 is stored. Modulo means remainder. A remainder of 3.
+ 1
Modulus is remainder value after the closest division. In case of 38 modulus 5. The closest we can go is 35(5 times 7). The remaining number is modulus. Three in this case. 38-35 equals 3. Hope this helps.
0
% this operator is used as modulus. Modulus means if u divide a/b then answer will be it's remainder. eg. 15%4=3or 11%2=1