CodePudding user response:
# include & lt; Stdio. H>
Int count (int n);
Int main ()
{
Int m;
The scanf (" % d ", & amp; M);
Printf (" % d \ n ", the count (m));
return 0;
}
Int count (int n)
{
Static int bit;
If (n==0)
return 0;
Bit++;
Count (n/10);
Return bit;
}
For your reference ~
CodePudding user response:
Int count (int n){
Return n & lt; 10? 1: the count (n/10) + 1;
}