+ 1
What is the answer for 8%5?
what is %?
14 Respostas
+ 6
gives u the remainder, 8%5 = 3
+ 6
As N3tW0rK has pointed out, it returns the remainder of a division expression. The % symbol is coined the term "modulus operator".
+ 3
8%5 = 8-5 * (8/5)=3
+ 3
As everyone explained % is modulus division. So % gives you the remainder of division.
But what if any one of the number of a float/double number?
1. 8%5 = 3
2. 8%2.5 = 0.5
Since 8 = 2.5*3 +0.5
3. 8.5%3 = 2.5
Since 8.5 = 3*2 + 2.5
4. 8.5%2.5 = 1.0
Since 8.5 = 2.5*3 + 1.0
Finally the conclusion is if modulus operator is used on float/double type numbers, then the division would be similar to integer division only
+ 2
Since % is the reminder operator 8%5= 3
+ 1
"Modulo Division" Is Work Like This :
a%b=a-(a/b)*b
So Answer Is , 8%5=3
+ 1
3
0
3
0
5 goes to 8 once and what is left the remainder which is 3 is what we call the modulo
modulo is the remainder & modulus is the % operator
/* Please forgive my English if it's bad */
0
8%5=3
because 8/5 return 1 and 3
3 is the type of java cod.
so 7%5=2
0
gives remainder for quotient be integer
0
3
give you remiander from devide 2 digit
0
java
0
java