The expression x = -7%2-8 would evaluate to.........
Answers
Answered by
4
x = -7%2 - 8
Let's first understand the order of precedence of operators.
By symbols:
**, *, /, //, %, +, -
By operation name:
Exponentiation, Multiplication, Division Integer Division, Modulus, Addition, Subtraction.
Applying the precedence to the expression,
-7%2 - 8
Modulus takes place first. In Modulus, only the remainder is taken.
1 - 8
What's left is subtraction.
-7
Therefore, -7%2 - 8 = -7.
x = -7
Equestriadash:
Thanks for the Brainliest! ♥
Answered by
3
Answer: -9
Explanation:
Similar questions
English,
4 months ago
Science,
4 months ago
Math,
9 months ago
Environmental Sciences,
9 months ago
Accountancy,
1 year ago
Accountancy,
1 year ago