log10 함수를 이용해 숫자값에 대한 문자형태의 길이를 구할 수 있다.


(int)log10((double)iValue + 1) + 1


int iValue = 123;

int iLength = (int)log10((double)iValue + 1) + 1;


+ Recent posts