+ 7
GUYS, HELP ME WHAT DOES MODULUS(%) MEAN?? AND HOW TO DIVIDE IT??...
plzz help
15 Réponses
+ 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
+ 8
in the modulus* operator the result is the remainder
+ 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
+ 5
🇳🇬Brains lol.. i got an F in maths😢
+ 5
🇳🇬Brains ik.. cuz before that in my class my teacher never teach %
+ 4
plzz give me example too...
+ 4
🇳🇬Brains soo hard.. im really weak in maths
+ 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
+ 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
+ 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 :)
+ 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 :-) ;-)
+ 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
+ 1
whether you got a F or A in maths,you should know how to use +,-,/,×
so % shouldn't be a prob