- 2
How?
How does 5-2*3+3=2?
18 odpowiedzi
+ 5
+ 5
Niki96521 No. According to math calculation order is
1 - Division
2 - Multiplication
3 - Addition
4 - Substraction
= 5 - 2 * 3 + 3
= 5 - 6 + 3
= 8 - 6
= 2
+ 5
5-6+3=2
-1+3=2
2=2
+ 3
5 - (2*3) + 3 = 5 - 6 + 3
(5 - 6) + 3 = -1 + 3
-1 + 3 = 2
ANSWER = 2
+ 3
Using BODMAS RULE first brackets are solved then Division and then multiplication followed by addition and subtraction.
Therefore, -2*3 = -6 and then -6+3 = -3 and -3+5 = 2.
This is how you will get 2.
+ 2
2 * 3 = 6
5 - 6 + 3 = 2
+ 2
Elaborating on what Denise Roßberg said
First "*" operator will be evaluated (due to its higher precedence)
So 2*3=6
Now the expression is 5-6+3
As now all the operators are of same precedence, so the it will be evaluated from left to right
That's why it is treated as
(5-6)+3=2
+ 1
Niki96521
You can also look here: https://www.google.de/amp/s/www.geeksforgeeks.org/operator-precedence-in-ruby/amp/
+ 1
Niki96521 No. Just use your calculator.
+ 1
k i got it
+ 1
Follow BODMAS/BIDMAS
2*3 = 6
5-6 = -1
-1 + 3 = 2
0
ok
0
Bodmas
Bracket
Division
Multiplication
Addition
Substraction
5-2*3+3=2
5-6+3=2
5-3=2
2=2
0
5-2*3+3=2
5-6+3=2
-1+3=2
2=2
0
See:
5-2*3+3=5-6+3
=-1+3
=2
In computer programming mathematical operation is different.
* And / are of same level and high priority
+ And - are of same level and low priority than upper operators
If same level operators are in single line then execution will be from single direction which is right to left.
- 1
Everyone here literally provided you a path. Learn basic order of operations, please.
- 4
but technically 18 is mathmaicaly correct
- 5
but 5-2=3 3+3=6 3*6=18