mirror of
https://github.com/Xevion/contest.git
synced 2025-12-09 00:06:40 -06:00
post pre increment decrement order in conjunction with precedence
This commit is contained in:
@@ -52,6 +52,7 @@ If you find something incorrect, feel free to contribute and modify.
|
||||
- [`hasNext` and `hasNextInt`](#hasnext-and-hasnextint)
|
||||
- [`next` and `nextInt`](#next-and-nextint)
|
||||
- [Examples with Explanations](#examples-with-explanations)
|
||||
- [Post-increment and Post-decrement Order is Important](#post-increment-and-post-decrement-order-is-important)
|
||||
|
||||
<!-- /TOC -->
|
||||
|
||||
@@ -611,3 +612,15 @@ s = new Scanner("2 h j l 3 4 o p 0 9");
|
||||
for(int i = 0; i++ < 5;)
|
||||
out.println(s.nextInt());
|
||||
```
|
||||
|
||||
|
||||
### Post-increment and Post-decrement Order is Important
|
||||
|
||||
```java
|
||||
public static int m(int x, int y) {
|
||||
if(x == 0)
|
||||
return 1;
|
||||
else
|
||||
return m(--x, y) * x;
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user