C language network -1097 title - Snake Matrix

Java implementation code:

java.util.Scanner Import; 

public class Practice_1007 {

public static void main (String [] args) {

int = row_first_number. 1; // first number of each row
int n = 0; // numeric keyboard input
int temp = 0; // instrumental variable
int add = 0; // initial value of an incremental

Scanner Scanner Scanner new new = (the System.in);
n-scanner.nextInt = ();

for (int I = 0; I <n-; I ++) {
= I + row_first_number;
int + I T = 2; // increment row auxiliary variable, which is to ensure that the initial value of an incremental next processing cycle
the Add = T;
for (int J = 0; J <(n- - I); J ++) {
IF (J == 0) {
of System.out.print (row_first_number);
temp = row_first_number + add;
} else {
System.out.print(" " + temp);
add++;
temp += add;
}
}
System.out.println();
}
}
}

 

 

Screenshot judgment:

 

 

 

 

This question is I do not know this is hard to define, I realize now I think it came out not very difficult thing. It took me a little time, always little details above mistake, I originally wanted to write about the detailed explanations. Fear is not enough time, and I had to learn knowledge, detailed explanations will do after the retired and sit supplement. However, this capture that feel they can not achieve the subject of very good, probably this will make people happy mood I choose to continue to adhere to it. I knew that I might not have the opportunity to participate in this game, only in the hands of some commercial game. A few days ago delete something, I feel that the content they involved too miscellaneous, should concentrate on a certain direction is. Adhere to achieve these topics in Java, is also stubborn determination. Before then the time wasted, we can not over 30 years old or now the slovenly appearance of it. Ability Well, have continued to accumulate, and it is trial and error and some things will continue to run into a wall.

 

Life is very real, a little later is better than never. Six months will see the difference, the pattern of the year will be different.

Guess you like

Origin www.cnblogs.com/blog-of-guoqi/p/11573312.html