通过一个月的基础班学习和思索,学会了从以下基础内容开始:
public class test {
public static void main(String[] args) {
int count = 1;
for(int x = 9; x >= 1; x--){
for(int c = 9; c >= 0; c--){
for(int v = 9; v >= 0; v--){
for(int b = 9; b >= 0; b--){
int j = x + v;
int k = c + b;
int n = x*1000+c*100+v*10+b;
int m = count%5;
if( j == k & m != 0 ) {
count++;
System.out.print(n+" ");
}else if ( j == k & m == 0){
count++;
System.out.println(n+" ");
}
}
}
}
}
}
}
等................................................(此处省略ArrayLIst<teacher>;结束)........................................等代码操作。