#include
using namespace std;
int getlen(char *s)
{
int n;
for(n = 0; *s != '\0'; s++)
n++;
return n;
}
void reverse(char s[])
{
char c,i,j;
for(i = 0,j = getlen(s) - 1; i < j; i++,j--)
{
c = s[i];
s[i] = s[j];
s[j] = c;
}
}
void my_itoa(int n,char s[])
{
int i=0,sign;
if((sign = n) < 0)
n = -n;
do
{/*以反序生成數字*/
s[i++] = n%10 + '0';/*get next number*/
}while((n /= 10) > 0);/*delete the number*/
if(sign < 0)
s[i++] = '-';
s[i] = '\0';
reverse(s);
}
void itochar(int num)
{
int i = 0;
int j ;
char stra[10];
char strb[10];
while ( num )
{
stra[i++]=num%10+48;
num=num/10;
}
stra[i] = '\0';
for( j=0; j < i; j++)
{
strb[j] = stra[i-j-1];
}
strb[j] = '\0';
cout<
}
int main()
{
int num;
cout<
cin>>num;
cout<
char b[16]={0};
my_itoa(num,b);
cout<
itochar(num);
}