发布网友 发布时间:2022-04-22 07:47
共2个回答
热心网友 时间:2023-12-06 10:24
void _itoah(int x, char* pBuffer, const char* token, int* pCount)
{
int temp1 = x / 16;
int temp2 = x % 16;
if (temp1 == 0)
{
pBuffer[0] = token[temp2];
return;
}
else
{
_itoah(temp1, pBuffer, token, pCount);
++(*pCount);
pBuffer[*pCount] = token[temp2];
}
}
void itoah(int x)
{
char Buffer[9];
const char* Token = "01234567ABCDEF";
int count = 0;
_itoah(x, Buffer, Token, &count);
Buffer[++count] = '\0';
printf("%s\n", Buffer);
}
int main()
{
itoah(340056708);
}
热心网友 时间:2023-12-06 10:24
合格和经济结构规范化