Define a variable to record the number of laps, loop variable initialization int i = 0;//execution loop condition i.e. cyclic condition while (i < Ten) { console.writeline ("Run" + i); i++;//i is the cyclic variable//condition is becoming more and more unsatisfied, eventually jumping out of the loop}//for (cyclic variable initialization; condition judgment; cyclic variable change) {//Loop body}console.writeline ("{0,2}", i), front 2 spaces,- 2 after two spaces (left justified)//outer row number, inner layer is the contents of the row for (int j = 1; j < 4; j + +) & nbsp { for (int i = 1; i < 4; I + +) { Console. Write ("{0,-2}", i); } Console. WriteLine (); }/99 multiplication table for (int i = 1; I < = 9; i++) { for (int j = 1; J <= I; j + +) & nbsp; { Console. Write ("{0}*{1}={2,-3}", J, I,i*j); } Console . WriteLine (); } Console. ReadKey ();Circular Summary:for most common, usually used to know the loop of the number of loopsWhile is also very common, often used for loops that do not know the number of loopsDo......while is not very common and is typically used for loops that need to be executed first.Break jumps out of this layer loop, continue ends the loop, usually with ifthe variable defined in for () is used only in the loop body {}.
C # Notes (v)--loop structure