We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98f8654 commit 07635ddCopy full SHA for 07635dd
src/integers/operator_precedence.md
@@ -10,6 +10,7 @@ None of this should be a surprise if you learned [PEMDAS](https://www.khanacadem
10
11
```java
12
// Following the order of operations:
13
+// 2 * 3 + 3 * 9 / 2 - 2
14
15
// 2 * 3 happens first
16
// 6 + 3 * 9 / 2 - 2
@@ -18,11 +19,12 @@ None of this should be a surprise if you learned [PEMDAS](https://www.khanacadem
18
19
// 6 + 27 / 2 - 2
20
21
// 27 / 2 happens next
-// because of int division, that gives 13
22
+// because of int division, that gives 13
23
+// (ignores float point number .5)
24
// 6 + 13 - 2
25
26
// 6 + 13 comes next
-// 19 - 7
27
+// 19 - 2
28
29
// and the final result is 17;
30
int result = 2 * 3 + 3 * 9 / 2 - 2;
0 commit comments