40.6k views
14 votes
8 / 4 + 3 % 2

How do you do this problem? You have to do the order of operations for programming.

2 Answers

11 votes

Answer:

3 (4 -6) = -8 is correct. The next step is to combine 4 and -6, obtaining

3(-2)

and this 3(-2) should equal -6, which is not the same as -8.

3(4 - 6) = 12 - 18, which differs from the student's solution. This is the reason for the wrong answer.

Step-by-step explanation:

User BenW
by
6.5k points
11 votes

Answer:

Step-by-step explanation:

3 (4 -6) = -8 is correct. The next step is to combine 4 and -6, obtaining

3(-2)

and this 3(-2) should equal -6, which is not the same as -8.

3(4 - 6) = 12 - 18, which differs from the student's solution. This is the reason for the wrong answer.

User Chenglou
by
6.0k points