int main()
{int x=389;
int n=0; while (x>0) {n++;x/=10; } printf ("%d\n",n); return 0;
最后少了个花括号。
末尾加}
有花括号