+ 1
I have numbers i want to know which one of this numbers one-digit,second-digit and three digit ?!
2 Antworten
+ 8
Assuming you are saying that you have some numbers and you want to know which number is of how many digit...
You may use the the len() function as follows
print(len(input()))
If you had something else in your mind.. kindly specify as the question is a bit unclear
0
Using a function in C++ as :
int FindDigits(int n )
{
for(int i=1; i<7; i++)
if(num<pow(i, 10))
return i ;
}