Challenge 5
Finally, you were asked to calculate 4 * (2 + 1) % 3
.
First, we take care of the values in parenthesis. This leaves us with 4 * 3 % 3
. Multiplication and modulo have the same precedence, so we go from left to right. 4 * 3
is 12
, and 12 % 3
is 0
, so 0
is our final answer.