#include<stdio.h>
#include<math.h>
int main()
{
int a,b,c,d,e,f;
int count=0;
printf("input a:
");
scanf("%d",&a);
if(a>9999)
{
count=5;
}
else if(a>999)
{
count=4;
}
else if(a>99)
{
count=3;
}
else if(a>9)
{
count=2;
}
else
{
count=1;
}
printf("count=%d
",count);
printf(" :");
b=a/10000;
c=(int)(a-b*10000)/1000;
d=(int)(a-b*10000-c*1000)/100;
e=(int)(a-b*10000-c*1000-d*100)/10;
f=(int)(a-b*10000-c*1000-d*100-e*10);
switch(count)
{
case 5:printf("%d%d%d%d%d",b,c,d,e,f);
printf("
:
");
printf("%d%d%d%d%d",f,e,d,c,b);
break;
case 4:printf("%d%d%d%d",c,d,e,f);
printf("
:
");
printf("%d%d%d%d",f,e,d,c);
break;
case 3:printf("%d%d%d",d,e,f);
printf("
:
");
printf("%d%d%d",f,e,d);
break;
case 2:printf("%d%d",e,f);
printf("
:
");
printf("%d%d",f,e);
break;
case 1:printf("%d",f);
printf("
:
");
printf("%d",f);
break;
}
printf("
");
return 0;
}