Can you solve 8÷2(2+2)?
Discussion in 'Other News' started by Chinatown, Aug 1, 2019.
Page 12 of 15
-
-
Trucking Jobs in 30 seconds
Every month 400 people find a job with the help of TruckersReport.
-
I found it!!! The rule that says the 2 outside the parentheses cannot be seperated from the parentheses...
Distributive property - Wikipedia -
In C++, this code does not work. It returns the error: expression cannot be used as a function X = 8/2(2+2);
However, this works and returns 16:
-
It seems to me, ambiguous notation like 2(3+5) should be eliminated and required to be explicit at all times 2*(3+5), as every programming language I have checked, requires.
-
-
Martin, here's yours:
PPMDAS and L to R.
1 plus 7 is 8
2 x 10 is 20
8 x 20 is 160 which is still a product of the brackets, because we do those first, and there IS NO OTHER operational sign. (nor are there brackets around the 40 minus 30) ... SO...
160 X 40 is 6400
6400 minus 30 is 6370.
(ps: apologize, my plus and minus keys are broke on this laptop..)
Carry on....Tomcat Out....Cattleman84 and Chinatown Thank this. -
Cattleman84 Thanks this.
-
That 'explicit' asterisk is what's misleading y'all. IT'S NOT THERE in the expression presented by @Chinatown .... makes all the difference in the world. Maybe man is STILL smarter than computers after all?
ps: 'Man' wrote C plus plus (sorry my sign is broken) and should have accounted for that faux pax in programming.Cattleman84 Thanks this. -
The fact remains, I went to college in my late 20's, early 30's... somewhere around 1995. All of the profs taught that 2(4) meant 2•4.
This is a matter of interpretation of implied multiplication. Just as there are different, sometimes overly complex ways to convey the same idea in language, the same follows for math.
If you mean...
8
------
2 • (2+2)
...then write it that way. There will be no confusion.
If you mean...
8
--- • (2+2)
2
...then write it that way, where it leaves no doubt as to your intentions.gentleroger Thanks this. -
This debate may go on, I just know how I learned it and stick to my 'old' guns, LoL.Cattleman84 and lilillill Thank this.
Trucking Jobs in 30 seconds
Every month 400 people find a job with the help of TruckersReport.
Page 12 of 15