数的位数

1.log10(num)+1

2.sprintf(str,"%d",num);输出strlen(str),所以不能初始化为0

原文地址:https://www.cnblogs.com/hxsyl/p/2461414.html