#include <stdio.h>
void itoa(int num,char *str)
{
while(num!=0)
{
*str=num%10+'0';
str++;
num=nnum/10;
}
*str='\0';
}
int main()
{
int num;
char str[8] = {0};
printf("please enter a number:");
scanf("%d",&num);
itoa(n,str);
printf("%s\n",str);
return 0;
}