I have a number like this: int num = 36729; and I want to get the number of digits that compose the number (in this case 5 digits).
int num = 36729;
How can I do this?>
Use this formula:
if(num) return floor(log10(abs((double) num)) + 1); return 1;