#include<stdio.h>
int reverse(unsigned int n);
int p_10(unsigned int x);
unsigned int n;
int main(void)
{ unsigned int hk;
hk=12345;
printf("%d",reverse(hk));
printf("\n");
return 0;
}
int reverse(unsigned int n )
{ unsigned int k=0;
if(n>10){
k=(n%10)*p_10(n)+reverse(n/10);
}else k=n;
return k;
}
int p_10(unsigned int x)
{ int i=0;
int j=1;
x=x/10;
for(;x!=0;i++){
x=x/10;
}
for( j=1;i!=0;--i){j=j*10;}
return j;
}