+ 2

Can someone explain what is modulos operator?

2nd Sep 2016, 8:49 PM
Yunus Kaya
Yunus Kaya - avatar
6 Réponses
0
The % stands for modulo. It's the remainder of a division. First we divide our numbers 10/3. This gives us 3.3333333... Now this was from dividing. If we add modulo, 10%3 we get 1. What we want is an interger from our division. 9/3 gives 3, 9%3 = 0. 10-9 = 1. 10%3 = 1. 10/3 does not work to get an interger, but 9/3 does. So 10-9 = 1 10%3 =1 Hopefully this explained what you wanted.
2nd Sep 2016, 10:10 PM
Andreas BeEm Kvist
Andreas BeEm Kvist - avatar
0
if / gets the QUOTIENT. then % gets the REMAINDER.
2nd Sep 2016, 11:36 PM
Erwin Mesias
Erwin Mesias - avatar
0
This question has been answered over and over an over again, please search befor asking questions, there is even an answer in the topics comments
4th Sep 2016, 4:27 AM
Khaled Moharram
Khaled Moharram - avatar
0
modules operator gives you remainder not else.
18th Sep 2016, 9:55 AM
ABHISHEK GOEL
ABHISHEK GOEL - avatar
0
gg
21st Oct 2016, 1:16 PM
Kostadin Michev
Kostadin Michev - avatar
0
sa
4th Nov 2016, 2:40 PM
Tugay