#include <stdio.h> #include <string.h> main() { long int InputNum; int TheCount=1; printf("输入一个数字"); scanf("%ld",&InputNum); while (InputNum/=10) { ++TheCount; } printf("%d",TheCount); }