例如
87 78
90 9
900900 9009
1.拆分数字 求他一共几位
public static void main(String[] args) {
// 翻转数字
// 87 78
// 90 9
// 900900 9009
// 1.拆分数字 求他一共几位
int n=900700;
int length = 0;
int t = n;
while (t!=0) {
t/=10;
length++;
}
boolean flag=false;
for (int i=0;i<length;i++) {
int x=(int) (n% Math.pow(10,i+1)/(Math.pow(10,i)));
if (x!=0){
flag=true;
}if(flag) {
System.out.println(x + " ");
}
}
}