+ 7

GUYS, HELP ME WHAT DOES MODULUS(%) MEAN?? AND HOW TO DIVIDE IT??...

plzz help

29th Apr 2018, 11:08 AM
Mirul Makenkov II
Mirul Makenkov II - avatar
13 Answers
+ 8
Basically you don't need to be a maths genius, all it means is the REMAINDER of a number... if you go 10/5 you get 2 so there's no remainer that is called a perfect sum, normally however division won't be perfect and won't always equal a whole number... 9/2 is equal to 4.5 which is a floating point variable in programming. that aside if we were to do 9%2 it would only return the remainder which is 1, cause 8/2=4 and 9/2=4 with a remainder of 1. This is my knowledge on it anyway and people feel free to correct me as I am learning too. I hope this helped. Also I suggest to start brushing up on your maths because programming has a lot of it. https://code.sololearn.com/ciSv9h9gGi7p/?ref=app
29th Apr 2018, 11:29 AM
Jordan Patterson
Jordan Patterson - avatar
+ 8
in the modulus* operator the result is the remainder
29th Apr 2018, 5:52 PM
Prabhat
Prabhat - avatar
+ 6
its the modulo operator.Divides two operands and returns the remainder 5%2 There are two 2's in five but two 2's makes up 4.add 4 to 1 and its 5 so..5%2=1 3%2=1 2%2=0
29th Apr 2018, 11:15 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 5
🇳🇬Brains lol.. i got an F in maths😱
29th Apr 2018, 11:18 AM
Mirul Makenkov II
Mirul Makenkov II - avatar
+ 5
🇳🇬Brains ik.. cuz before that in my class my teacher never teach %
29th Apr 2018, 11:21 AM
Mirul Makenkov II
Mirul Makenkov II - avatar
+ 4
plzz give me example too...
29th Apr 2018, 11:08 AM
Mirul Makenkov II
Mirul Makenkov II - avatar
+ 4
🇳🇬Brains soo hard.. im really weak in maths
29th Apr 2018, 11:16 AM
Mirul Makenkov II
Mirul Makenkov II - avatar
+ 4
it requires basic knowledge of division, just divide the two and take the remainder 4/2=2 5/2=2.5 but 5%2=1:: 2*2+1=5 7%2=1:: 2*3+1 9%5=4:: 5*1+4
29th Apr 2018, 11:18 AM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
Mirul Makenkov II If you have 5 (five) cats and 4 (four) friends. If you want to divide the cats to your friends, you will give each 1 (one) cat and you will get 1 cat remaining, so: 5 // 4 = 1 # five divided by for is one 5 % 4 = 1 # and one remains
29th Apr 2018, 11:25 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 3
Ulisses Cruz yeah I fixed them up, it's late at night here and my brain is not functioning! thank you for helping me avoid potential confusion :)
29th Apr 2018, 11:41 AM
Jordan Patterson
Jordan Patterson - avatar
+ 3
this is a joke right??? wel if its not, its the remainder of the two numbers you divided. examples: 4 % 2 == 0 5 % 2 == 1 28 % 5 == 3 hope you understand :-) ;-)
29th Apr 2018, 11:42 AM
ghali lawal
ghali lawal - avatar
+ 2
it's just basically the remainder of what you divide example is if you do this 10/3= 9 remainder 1 so 10%3=1 or 10%10= 0 because there's no remainder according to my basic knowledge tho
29th Apr 2018, 12:00 PM
omojola
omojola - avatar
+ 1
whether you got a F or A in maths,you should know how to use +,-,/,× so % shouldn't be a prob
29th Apr 2018, 11:20 AM
᠌᠌Code X
᠌᠌Code X - avatar