View Poll Results: Which of the poll expressions will provide a different answer ?

Voters
5. You may not vote on this poll
• ( 45 * ( 9 - 5 + 8 ) - 36 / 4 )

1 20.00%
• ( 45 * ( 9 - ( 5 + 8 ) ) - 36 / 4 )

4 80.00%
• ( 45 * ( 9 - 5 + 8 ) - ( 36 / 4 ) )

0 0%
• ( 45 * ( ( 9 - 5 ) + 8 ) - 36 / 4 )

0 0%

1. Operators precedences

Which of the poll expressions will provide a different answer ?

3 out 4 of the above expressions will return the same result.
1 out of 4 will return a different result

Reply quickly without looking at other's posts :)

2. I think the different one should be #2, because of the ( 9 - ( 5 + 8 ) ) member... such a brain damaging task in the morning...

The first part of the expression (45*) is the same, the middle one (with 9,5, differs in the second formula and the last one (36,4) is the same, because "/" has bigger priority than "-", so brackets make no difference.

Petr

3. Of course this forum is just an "excuse" (I hope an enjoyable "excuse") to activate some interest in different matters all of you are interested in.
Not great complication, just little "How to ...", "do you know ...", "are you able to ...", ...

4. I knew the solution and voted right - before your spoilers appeared. Now I just ask myself - who of you both, Petr or John voted the wrong result?
When I voted, mine was the second vote, the first was of Eros since that time no other users who read this thread were displayed.
There are four votes right now: 3 (75%) for the right solution, 1 (25%) was wrong.
Now each of you (presumed you are the voters) knows, who did the wrong guess since I know that mine and Eros are right.
If one of you did not vote yet - you should do it now and clear yourself from my suspicions

5. ......

6. It took a few seconds and I needed to delve into the memory banks for computational priority (don't know if that's a real term, but it sounds intelligent), then the inner parenthesis gave me the clue to go with #2.

Now I'll go take a nap, as too much thinking is not a good thing at my age. As witnessed by me taking months trying to work out a looping routine, but I'll get there some day.

Lance

There are no members to list at the moment.

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•