package test;
public class Test{
public static void main(String[] args) {
int num = 102201;
int temp = num;
int r = 0;
if(num >= 0 && num<10){
System.out.println("是");
return;
}else{
while(temp/10>0){
r = r*10+temp%10;
temp = temp/10;
}
r = r*10 + temp;
}
System.out.println(r);
if(r==num){
System.out.println("是");
}else{
System.out.println("不是");
}
}
}
判断是否回文数
最新推荐文章于 2022-12-25 13:03:48 发布