#include<stdio.h> int _Inverse(int n) { int m; for (m=0; n>0; n/=10) m = m*10 + n%10; return m; } main() { int i; for(i=100; i<=9999; i++) if (_Inverse(i) == i) printf("%d\n", i); }