Complete the code to correctly calculate the result using operator precedence.
result := 3 + 4 * [1]
The multiplication happens before addition, so 4 * 5 = 20, then 3 + 20 = 23.
Complete the code to correctly evaluate the expression with mixed operators.
result := (10 - 2) / [1] + 3
Parentheses first: 10 - 2 = 8. Then division: 8 / 2 = 4. Finally addition: 4 + 3 = 7.
Fix the error in the expression to get the correct result.
result := 5 + 3 * 2 [1] 4
Multiplication first: 3 * 2 = 6. Then addition: 5 + 6 = 11. Finally subtraction: 11 - 4 = 7.
Fill both blanks to correctly compute the expression with operator precedence.
result := (8 [1] 4) [2] 2
First, inside parentheses: 8 - 4 = 4. Then multiply by 2: 4 * 2 = 8.
Fill all three blanks to correctly evaluate the complex expression.
result := (6 [1] 2) [2] (3 [3] 1)
Calculate inside parentheses: 6 + 2 = 8 and 3 / 1 = 3. Then multiply: 8 * 3 = 24.