mirror of
https://github.com/Xevion/contest.git
synced 2025-12-15 04:11:27 -06:00
fix q13 incremental ops position, out.println
This commit is contained in:
@@ -171,7 +171,7 @@ What I'm talking about is the `unary operators`, `++` and `--`.
|
||||
|
||||
Pre-increment `++x`
|
||||
|
||||
Post-increment `y--`
|
||||
Post-increment `y++`
|
||||
|
||||
Post-decrement `--this.halogen.id`
|
||||
|
||||
@@ -184,7 +184,7 @@ Pre-increment `dragon.level++`
|
||||
```java
|
||||
int x = 3;
|
||||
int y = 4;
|
||||
println(++x + ++y + y++)
|
||||
out.println(++x + ++y + y++)
|
||||
```
|
||||
|
||||
The evaluating engine (or whatever) sees a 4 with the pre-increment operator, x is incremented to 4, and returns a 4. Then, y is incremented to 5, and the operator returns a 5.
|
||||
|
||||
Reference in New Issue
Block a user