Answers for "how to get number of int in c++"

C++
0

number of digits in int c++

int length = 1;
int x = 234567545;
while ( x /= 10 )
   length++;
Posted by: Guest on July-14-2021
0

how to find out the amount of ints in c++

int x = 1000;
int numberOfDigits = x ? static_cast<int>(log10(abs(x))) + 1 : 1;
Posted by: Guest on September-21-2021

Code answers related to "how to get number of int in c++"

Browse Popular Code Answers by Language