Orange. I could have written that word as 'Banana', but that doesn't change the fact that the way that it was written was 'Orange'.poison_ivy wrote:It was written 1+1 x 2+2. He could have written 1 + 1 x 2 + 2, which equals 6; (1+1)(2+2), which equals 8; or 1 + (1 x 2) + 2, which equals 5, and they would have made sense. As it is, it seems that the closest thing is the second example. So the answer is 8.
Multiplication always has a higher precedence than addition during evaluation, so the answer is 5. Math isn't python, whitespace has no effect on the result.
http://en.wikipedia.org/wiki/Order_of_o ... operations
---Freeyorp