How Does Modulus Divison Work

后端 未结 19 1904
栀梦
栀梦 2020-11-22 06:55

I don\'t really understand how modulus division works. I was calculating 27 % 16 and wound up with 11 and I don\'t understand why.

I can\'t

19条回答
  •  野性不改
    2020-11-22 07:20

    Lets say you have 17 mod 6.

    what total of 6 will get you the closest to 17, it will be 12 because if you go over 12 you will have 18 which is more that the question of 17 mod 6. You will then take 12 and minus from 17 which will give you your answer, in this case 5.

    17 mod 6=5

提交回复
热议问题