If we need to force an addition or subtraction to take place before the multiplications and divisions then we need to place that calculation inside of parentheses. Anything in parentheses is done before any multiplications and divisions.
1 5 + 3 * 6 = 23
2 4 * 7 / 2 + 3 = 17
3 17 % 3 + 22 * 5 = 112
4 (5 + 3) * 6 = 48
5 4 * 7 / (2 + 3) = 5.6
With 1 the multiplication is performed before the addition and so three times six is eighteen plus five gives twenty three.
In 2 we multiply the four and seven together first and then divides by two to give fourteen to which the three is finally added.
3 takes the remainder from dividing seventeen by three. As three goes into seventeen five times with two over this means that 17%3 is equal to 2. Next twenty two and five are multiplied together to give 110. Finally the results of these two intermediate calculations are added together to give a final answer.
This article written by Stephen Chapman, Felgall Pty Ltd.