Содержание
- 2. Often a novice programmer gets lost in these i ++ and ++ i. In this short
- 3. But why, and most importantly, in what cases i ++! = ++ i? The fact is
- 4. I++ increment operation This operation returns the value of I before 1 is added to I.
- 5. Now to consolidate the material, I will give a few examples.
- 6. Example 1: while loop As we can see in the first case i value is displayed
- 7. Example 2: for loop In this case, in fact, nothing changes. Those. whether you use ++
- 8. The following example is identical to example 1 with a while loop:
- 10. Скачать презентацию