数的位数

1.log10(num)+1

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

posted @ 2012-04-21 13:44  加拿大小哥哥  阅读(173)  评论(0编辑  收藏  举报