main() {long i,j,m,n; long a,num; scanf("%ld",&a); i=a/10000; j=a/1000%10; m=a%10; n=a/10%10; num=m*10000+n*1000+(a/100%10)*100+j*10+i; printf("your input number is %ld\nafter changed the number is %ld\n",a,num); getch(); }
或者这个 main() {long a; scanf("%ld",&a); printf("your input number is %ld\nafter changed the number is %ld\n",a,a%10*10000+a/10%10*1000+a/100%10*100+a/1000%10*10+a/10000); getch(); }