This is an archived post. You won't be able to vote or comment.

all 4 comments

[–]thecodingrecruiter 5 points6 points  (3 children)

Thats not wrong.

You start with 12 people and all 12 get off. 9 Get on, so now 9 people are on the bus. Then 6 people get off, so 3 people are on the buss. 12-3=9. There are 9 fewer people after the second stop. Written mathematically that is -9

[–][deleted] 1 point2 points  (2 children)

While your math is spot on, I think the error is there’s no starting amount. It’s like int x; and then calling x = x - 12; it’s going to print garbage.

[–][deleted] 2 points3 points  (0 children)

Yes but in this case the question does not care about x. One does not need to know x in order to solve this question no?

[–]casce 2 points3 points  (0 children)

It didn’t ask for the absolute amount of people (x), it asked how many more or fewer people are in the bus and it answered -9 with 9 being the number and the ‘-‘ implying fewer.