Problem Description:
1221 is a very special number, it is read and read from the right as from the left, seeking programming all such four-digit decimal number.
Output formats:
In ascending order of output of four decimal number satisfying the condition.
Programming:
#include<cstdio>
int main() {
int a,b,c,d;
for (int i = 1000; i <= 9999; i++) {
a = i/1000;
b = i%1000/100;
c = i%100/10;
d = i%10;
if (a == d && b == c) printf("%d\n",i);
}
return 0;
}