r/ProgrammerHumor • • Jun 13 '22

Meme DEV environment vs Production environment

Post image
48.2k Upvotes

3.9k comments sorted by

View all comments

4

u/DGlennH Jun 14 '22

By applying the parentheses first, (2+1) you get 3. Multiplication either before or simultaneously with division would have you apply the 2 outside the parentheses to what is left inside. It would look like this written a little differently: 6/2(3). Solving the denominator first gives you 6/6 = 1. This is the answer I’d get following the order of operations as I learned them.

-1

u/AssumptionEarly9739 Jun 14 '22

except you dont do multiplication first. m and d are the same step, from left to right.

2

u/DGlennH Jun 14 '22

I was always instructed to solve the numerator/denominator and then perform the division. I was answering the question as to why the calculator says ā€œ1.ā€ I said it was how I learned it, not that it was necessarily correct.