- Dec 12, 2020
- 1,389
- 2,528
These are such lousy arithmetic problems that you also know from newspapers. What is in brackets always has priority. after that point calculation comes before line calculation. And equivalent calculations always go from left to right. Nevertheless, I often despair of it.Both expressions (with and without brackets) are syntactically and semantically correct but they have different result.
Order of operations is:
1. Brackets
2. Multiplication / division
3. Addition / subtraction
4. From left to right (this is step which many people forget)
So for expression with brackets you have:
10 -(2x2+6) = 10 - (4+6) = 10 - 10 = 0
and for expression without brackets (like in game) you have:
10 -2x2 + 6 = 10 - 4 + 6 = 6 + 6 = 12
In attachment you have result from calc.