对于一个数字,要提取其各位数上的数字,用如下方法
while(a != 0){ i = 0; b[i] = a % 10; a /= 10; i++; }
以前我只会知道位数的数字提取各位数数字,用这个方法可以解决不知道位数的各位数字。 来自洛谷P1980