```c
//字符串逆置
void Reverse(char* str)
{
char tmp;
char* p;
for (p = str; *p != '\0'; ++p);//找尾巴
for (p--; str < p; str++, p--)
{
tmp = *p;
*p = *str;
*str = tmp;
}
}
void Myitoa(char* str, int n)
{
int i = 0;
do
{
str[i++] = n % 10 + '0';//得到末位数
n /= 10;//丢弃末位
} while (n != 0);
str[i] = '\0';//最后别忘了字符串结束标志
Reverse(str);//将字符串逆置
}