/******************************************************************************************************
* @file name: :Count
* @brief :
* @author :[email protected]
* @date :2024/06/03
* @version 1.0 :V1.0
* @property :暂无
* @note :None
* CopyRight (c) 2023-2024 [email protected] All Right Reseverd
******************************************************************************************************/
/*******************************************************************************************************
* @function name : GetCount
* @brief : 输入一个整数,返回这个整数的位数
* @param :nValue
* @retval :int
* @date :2024/06/03
* @version :V1.0
* @note :None
*******************************************************************************************************/
int GetCount(int nValue)
{
unsigned int num;
while (nValue != 0)
{
nValue = nValue / 10;
num++;
}
printf("%d\n", num);
return num;
}
标签:nValue,int,整数,2024,num,位数,输入
From: https://www.cnblogs.com/hhail08/p/18229756