For Loop dual variables, for variables
For Loop double variable 1: Introduction
Usually, the for loop is as frequently as a slap in the face. Today, the for loop gets stuck and remains a layer of for loop. As follows:
public class CommaForLoop{public static void main(String[] args){for(int i = 1, j = i + 10; i < 5; i ++, j = i *2){System.out.println("i = " + i + " j = " + j);}}}
Ii. Analysis
No. You may try running it on your machine and give the result. An execution process with results. Have you ever been confused with me...
Summary:
The most familiar unfamiliar for is that it is OK to be careful. Today, you can open your computer, start the project, access the project, be stupid, and there is no page shown... A variety of tangle for an hour. Finally, it is found that a pair of <title> xxx </title> in jsp is changed to <title> xxx </titEel>. The little hand shakes and the page does not exist. Careful and careful, each step well considered, cannot simply pursue fast. Sometimes it is counterproductive.
What are the differences in the for loop control variables?
Only 2nd of the three conditions of a for loop are meaningful conditions, and the other two are auxiliary conditions, such:
For (I = 0; I <3; I ++) {x ++ ;}
This can actually be written.
I = 0;
For (; I <3;) {x ++; I ++ ;}
Similarly, the loop code in your problem is only related to the condition of loop bounce.
The execution process is
First time: x = 10 y = 10 output 1010
X auto-subtraction, y = ++ I
Second time: x = 9 y = 1 Output 91
X auto-subtraction, y = ++ I
Third time: x = 8 does not meet the condition to jump out of the loop
Variable problems in matlab dual-cycle
Sum (f (I,), which can be called in sequence.