What is the answer to this?

What number do you get?


  • Total voters
    65

classical_hero

In whom I trust
Joined
Jan 30, 2003
Messages
33,262
Location
Perth,Western Australia
480510_386661108066459_474427331_n.jpg
 
Impossible to answer without any indication of the priority of the operators. Sorry.
 
The answer is 7, and that division symbol is an abomination.
 
Gah, i always see these floating around the interwebz. I predict the thread will come down to two camps arguing over the right answer untill Truronian steps in with the right answer ;)
My answer is 7.
 
The answer is 7, and that division symbol is an abomination.

it's the one we used way back in high school....haven't really seen it since then

and yes, the answer is 7
 
2/2=1
1x0=0
6-0=6
6+1=7

I probably did it wrong.

west india man said:
Order of operations is Brackets,Indicies, Division, Multiplication, Addition, Subtraction
I was taught it as bodmas, with the o standing for "power of".
 
Aren't these sorts of questions usually meant to have some of conflict in the order of operations? This one quite clearly doesn't.
 
Yes, the most usual conventional precedence is bodmas. But unless you specify this is what you mean, who's to know?

And this why it is usual to use brackets to remove ambiguity.

(6-1)x0 + (2/2) =/= 6-(1x0) + (2/2) =/= ((6-1)x0 -2)/2 etc.
 
you forgot the zero from the 1x0 operation

so it's 6-0+1 = 7
 
With mixed multiplication, division, addition, and subtraction expressions do the multiplication and divsion first, left to right, then addition and subtraction, left to right.

6-1x0+2/2 = ?

So we do the multiplication and division

6-1x0+2/2 = 6 - 0 + 2/2 = 6 - 0 + 1 = 6 + 1 = 7
 
This line in C# gives x as 7 which is ofcourse correct.

int x = 6-1*0+2/2;
 
Back
Top Bottom