public class Demo {
public static void main(String[] args) {
copy();
}
public static void copy(){
Integer x;
for(x= 10000;x<100000;x++){
char[] ch = x.toString().toCharArray();
if(ch[0]==ch[4]&&ch[1]==ch[3]&&ch[0]+ch[1]+ch[3]+ch[4]==ch[2]+'0'*3)
System.out.print(x.toString()+'\t');
}
}
} |