ljf181275034
#include <stdio.h>
void itoa(char str[],int num);
void main()
{
 int num;
 char str[10];
 scanf("%d",&num);
 itoa(str,num);
 printf("%s\n",str);
}
void itoa(char str[],int num)
{
 int i=0,j=0;
 int temp[10];
 do{
  temp[i++]=num%10+\'0\';
  num=num/10;
 }while(num);
 temp[i]=\'\0\';
 while(--i>=0)
 {
  str[j++]=temp[i];
  
 }
 str[j]=\'\0\';
}

分类:

技术点:

相关文章:

  • 2021-12-06
  • 2021-12-20
  • 2021-11-11
  • 2021-11-29
  • 2021-09-07
  • 2021-11-29
猜你喜欢
  • 2021-11-07
  • 2021-12-06
  • 2021-12-10
  • 2021-12-16
  • 2021-09-07
  • 2021-11-07
相关资源
相似解决方案