mirror of
https://github.com/Fechin/reference.git
synced 2026-11-25 07:04:42 +03:00
fix: correct arithmetic operation results in Rust reference
This commit is contained in:
1 parent
16ab6d35fa
commit
738bd672d4
1 file changed
+3
-3
@@ -412,9 +412,9 @@ let mut l = k;
|
||||
|
||||
| Operator | Description |
|
||||
| -------------------- | --------------------------------------- |
|
||||
| `k += l` | Add a value and assign, then k=9 |
|
||||
| `k -= l` | Substrate a value and assign, then k=18 |
|
||||
| `k /= l` | Divide a value and assign, then k=9 |
|
||||
| `k += l` | Add a value and assign, then k=18 |
|
||||
| `k -= l` | Subtract a value and assign, then k=0 |
|
||||
| `k /= l` | Divide a value and assign, then k=1 |
|
||||
| `k *= l` | Multiply a value and assign, then k=81 |
|
||||
| <code>k \|= l</code> | Bitwise OR and assign, then k=89 |
|
||||
|
||||
|
||||
Reference in new issue
Block a user