in Java the expression 8% 3 evaluates to what
Answers
Answered by
54
Hey There!!
The % is the Modulus Operator. It gives the remainder when the first number is divided by the second.
In other words, if we write a%b, then the result is the remainder when a is divided by b.
Let's see the question here:
Here, we are given 8%3.
Let's divide 8 by 3. The quotient is 2, and the remainder is also 2.
That is:
8 = (3*2) + 2
Thus, 2 is the remainder.
So, 8%3 = 2 .
Hope it helps
Purva
Brainly Community
The % is the Modulus Operator. It gives the remainder when the first number is divided by the second.
In other words, if we write a%b, then the result is the remainder when a is divided by b.
Let's see the question here:
Here, we are given 8%3.
Let's divide 8 by 3. The quotient is 2, and the remainder is also 2.
That is:
8 = (3*2) + 2
Thus, 2 is the remainder.
So, 8%3 = 2 .
Hope it helps
Purva
Brainly Community
Suparidhi:
thanks
Answered by
9
Answer:
Hey Mate!!
Your answer is 2.
Explanation:
It is because 8%3 is a modulus operator and it gives the remainder as the answer.
Similar questions