All Jokes aside, what is 6/2(1+2)?

Started by
115 comments, last by BaneTrapper 8 years, 11 months ago

I just created a LinkedIn account because I am jobless and I need to get a job. I was browsing around and saw a post asking what 6/2(1+2) is. I was shocked at the answers, especially from CEOs, engineers, accountants, IT professionals, etc.

I think I should update this to say that 9/10 people get this wrong.

They call me the Tutorial Doctor.

Advertisement

6 / 2 ( 1 + 2 )

6 / ( 2 * 3 )

6 / 6

1

Brackets first

Multiplication next

Division next

Addition next

Subtraction last

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

Is there a trick or something? I don't see how anyone can fail else?

6 / 2 ( 1 + 2 )

6 / ( 2 * 3 )

6 / 6

1

Brackets first

Multiplication next

Division next

Addition next

Subtraction last

No? Why would there be "multiplication next". Things happen in the order they are written unless an order of precedence states otherwise, multiplication doesn't have precedence over division

Edit : so to make it more obvious it's

6 / 2 (1 + 2)

6 / 2 * ( 1+2)

Then solve what's Inside each group

6 / 2 * (3)

Then solve all operations in order of priority (does not apply here, multiplication and division have the same precedence)

Then solve all operations in order in which they are written

((6/2)*3)

((3)*3)

3*3

9

6 / 2 ( 1 + 2 )
6 / ( 2 * 3 )
6 / 6
1
Brackets first
Multiplication next
Division next
Addition next
Subtraction last

brackets first means you resolve what's inside the brackets, giving:
6/2*3
Multiplication and division are equal in priority, so you go from left to right, meaning the divide by 2 comes before the multiply by 3:
3*3
9

No? Why would there be "multiplication next". Things happen in the order they are written unless an order of precedence states otherwise, multiplication doesn't have precedence over division

.

The rules of order of operations dictates brackets, multiplication, division, addition and than subtraction .

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

6 / 2 ( 1 + 2 )

6 / ( 2 * 3 )

6 / 6

1

Brackets first

Multiplication next

Division next

Addition next

Subtraction last

No? Why would there be "multiplication next". Things happen in the order they are written unless an order of precedence states otherwise, multiplication doesn't have precedence over division

.

The rules of order of operations dictates brackets, multiplication, division, addition and than subtraction .

This is sadly not being taught in school anymore.

No it's being taught in school and you need to read it smile.png As i said multiplication and division have the same order of precedence so you solve them in the order in which they're written (in this case division first then multiplication)

Moreover, division is just multiplying the multiplicand with the inverse of the multiplier, which reinforce the fact that division has the same priority as multiplication.

Therefore, you have to read the equation from left to right when there are equal priorities.

error C2064: term does not evaluate to a function taking 1 arguments

I've seen some good troll equations in my time, but this one is weaksauce!

6 / 2 * ( 1 + 2 )
6 / 2 * 3
3 * 3
9


Console.WriteLine(6 / 2 * ( 1 + 2 )); // output = 9
The usual part of the troll is someone mentions "PEMDAS", thinking each letter is the order you perform operations in. It's misleading because it should be P,E,(M|D),(A|S) instead, and the acronym loses information about "same precedence", "left to right associativity", and recursive application.

Anyone who's written an LR parser knows how this stuff works.

This topic is closed to new replies.

Advertisement