#include <stdio.h> int main(void) { int num; int n; while((scanf("%d",&n))==1) { for(num=0;n;n/=10) { num=num*10+n%10; } printf("%d\n",num); } return 0; }
gl@gl:~/c$ ./a 1234 4321 123456 654321 1234567 7654321 12 21 12345678 87654321 a gl@gl:~/c$