asked 162k views
1 vote
What is the value of m after evaluating the following expression:m -= 9%++n + ++n/2; when int m=10,n=6. Pls Answer Now..

asked
User Ramiwi
by
8.5k points

1 Answer

2 votes

Final answer:

To evaluate the expression, perform the operations within the parentheses first and then subtract the resulting values from m.

Step-by-step explanation:

To evaluate the given expression, we start by performing the operations within the parentheses first. First, we calculate the value of 9%++n. The '++' operator increments the value of n by 1, so n becomes 7. Then we find 9% of 7, which is 0.63.

Next, we calculate the value of ++n/2. The '++' operator increments the value of n by 1 again, so n becomes 8. Then we divide 8 by 2, which is equal to 4.

Finally, we subtract 0.63 and 4 from m. Since m is initially 10, the value of m after evaluating the expression is 10 - (0.63 + 4) = 5.37.

Learn more about Evaluating Expressions

answered
User Nicholas Hazel
by
8.4k points

No related questions found

Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.