/*
需求:打印一些特殊的数.
*/
class WuWeiShu {
public static void main(String[] args) {
for(int x = 10000;x <= 99999;x++) {
int ge = x % 10;
int shi = (x / 10) % 10;
int bai = (x/10/10) % 10;
int qian = (x/10/10/10) % 10;
int wan = (x/10/10/10/10) % 10;
if(ge == wan && shi == qian && (ge + shi + qian + wan) == bai) {
System.out.println(x);
}
System.out.println();
}
}
}
为啥这是一个死循环?求解释! |
|