Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (anonymous):

Order of Operations Question! I am vary perplexed right now...I have gone through every possibility I can think of here and I am getting the answer 23. The answer is supposed to be -19 though...question below.

OpenStudy (anonymous):

OpenStudy (anonymous):

25-(16-9)+7-2

OpenStudy (anonymous):

Which furthers my point...

OpenStudy (angela210793):

i got 23 O.o

OpenStudy (anonymous):

23 is the right answer

OpenStudy (anonymous):

23 toooooooooooo.......

OpenStudy (anonymous):

Apparently no. Unless they put in the wrong answer...

OpenStudy (angela210793):

y do u say the answer is supposed to be 19 O.o

OpenStudy (anonymous):

i'm getting......

OpenStudy (anonymous):

This is for my programming class. We're going over Order of Operations for programming, but they say the answer is -19 when everyone is getting 23...

OpenStudy (anonymous):

haha....

OpenStudy (anonymous):

Oh so it is from programming>??

OpenStudy (anonymous):

Then the answer will be -19..

OpenStudy (anonymous):

unless they want you distribute the - sign before the (16-9) making it -16+9

OpenStudy (anonymous):

How so?

OpenStudy (anonymous):

Programming has different rules...

OpenStudy (anonymous):

as written, it is 23... are you s'posed to read the expression as the input given by the user?

OpenStudy (anonymous):

25-(16-9)+7-2 25-16+9+7-2 9+9+7-2 18+7-2 25-2 23 GRRR ITS STILL 23

OpenStudy (anonymous):

Ok. I should probably ask this in the computer science section then... @dpaInc Not sure... THis was like a quick evaluation before I move on. I got everything but this one right...

OpenStudy (anonymous):

ie, will the user input the expression?

OpenStudy (anonymous):

Ummm no? THis is all I was given to work with:

OpenStudy (anonymous):

math and computer science CLASH!!!!

OpenStudy (anonymous):

lol...I asked it in the math section since it seemed a lot more like math than programming to me...

OpenStudy (anonymous):

Is there something I'm missing...?

OpenStudy (anonymous):

What does Part 2 say??

OpenStudy (anonymous):

It just talks about what modulus is...here is a screenshot:

OpenStudy (phi):

what language is this? I notice your order of ops does not define exponentiation, nor the effect of parens. but with mult and div having higher precedence than add/subtract there is no way to get negative 19 out of this expression.

OpenStudy (anonymous):

Java

OpenStudy (anonymous):

Is there no possible way for it to be -19?

OpenStudy (phi):

I just ran class Main { public static void main (String[] args) throws java.lang.Exception { java.io.BufferedReader r = new java.io.BufferedReader (new java.io.InputStreamReader (System.in)); String s; System.out.print(5*5-(4*4-3*3)+14/2-6/3); } } and it printed out 23

OpenStudy (anonymous):

Really? I'm going to e-mail my teacher then and see what she says since it seems that it should indeed by 23...

OpenStudy (anonymous):

Thanks everyone for verifying for me...

OpenStudy (anonymous):

For all of those that worked on this. Apparently the website had a typo...the question was supposedly supposed to be: \[5^2 - (4^2 - 3^2)^2 + 14/2 - 6/3\]

OpenStudy (anonymous):

thanks... i was interested to see if i was going crazy or not...:)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!