输入一个正整数x,求出它是几位数,并分别打印出各位上的数字。
int x;int sum=1;for(int i=10 ;i>0;i*=10){if(x/i==0){console.write(x%10);//个位数console.write(sum);//位数return;}sum++;
}