+ 4
Can you guys explain what's modulo operation in Java???
13 Answers
+ 6
it's for calculating the remainder!
if a number n=ax+b [b is less than both a and x]
and we try to divide it with a, we get x but b remains as a remainder! so it's like
divide 10 with 3... you get 3*3=9 and 1 remains as 9+1=10. so here 1 is the remainder.
so to find the remainder you have to use % operator..
int remainder;
remainder = 10%3; // value is 1
remainder = 10%5; // value is 0 because 5 completely divides 10
remainder=23%4; // remainder is 3. 4*5+3=20
+ 1
haha man i knew it how long u been coding
+ 1
lol same
+ 1
thanks Jaber Ahmed... I've got it â„ïž
+ 1
modulus is what is remained after you perform a division 3 / 2 then the modulus is 1
+ 1
itâs the same in all languages
0
I seem to understand know it only tells the remainder duh
0
I'm not helping am I lol
0
guessing ur lvl u been here long
what are in for(prison talk)
0
Hi