import java.util.Scanner;
public class TestDemo {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);//键盘输入数字
System.out.println("请输入一个数");
int a = sc.nextInt();
int temp=10;
String str = String.valueOf(a); //将数字转换成字符串
int b = str.length(); //判断该字符串长度,即数字位数
System.out.println("该数字:"+b+"位,");
while(b>0){
int x = a%temp; //得到末尾数数字
a = a/temp;
System.out.print(x+",");
b--;
}
}
}