代码问题:输出一个整数的位数
#include<stdio.h>int main(){int x;int n=0;scanf("%d",&x);n++;while(x>0){++n;x/=10;}printf("%d\n",n);return 0;}结果:1234
while上面的n++去掉