mirror of
https://github.com/Xevion/contest.git
synced 2025-12-12 14:11:14 -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)
|
- [`hasNext` and `hasNextInt`](#hasnext-and-hasnextint)
|
||||||
- [`next` and `nextInt`](#next-and-nextint)
|
- [`next` and `nextInt`](#next-and-nextint)
|
||||||
- [Examples with Explanations](#examples-with-explanations)
|
- [Examples with Explanations](#examples-with-explanations)
|
||||||
|
- [Post-increment and Post-decrement Order is Important](#post-increment-and-post-decrement-order-is-important)
|
||||||
|
|
||||||
<!-- /TOC -->
|
<!-- /TOC -->
|
||||||
|
|
||||||
@@ -611,3 +612,15 @@ s = new Scanner("2 h j l 3 4 o p 0 9");
|
|||||||
for(int i = 0; i++ < 5;)
|
for(int i = 0; i++ < 5;)
|
||||||
out.println(s.nextInt());
|
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