获得数字的位数
private int getFigure(int x){
int val = 10, figure = 1;
while( ( x / val ) > 0 ){
figure++;
x /= val;
}
//System.out.println("该数字有【" + figure + "】位");
return figure;
}
获得数字的位数
private int getFigure(int x){
int val = 10, figure = 1;
while( ( x / val ) > 0 ){
figure++;
x /= val;
}
//System.out.println("该数字有【" + figure + "】位");
return figure;
}