SyntaxFix
Write A Post
Hire A Developer
Questions
int intLength(int i) { int l=0; for(;i;i/=10) l++; return l==0 ? 1 : l; }
Here's a tiny efficient one