#include "stdio.h"
int func(int n){
int m,t;
for(t=0,m=n;m;(t*=10)+=m%10,m/=10);
return t==n ? n : 0;
}
int main(int argv,char *argc[]){
int i;
printf("The results are as follows:\n");
for(i=11;i<1001;i++)
if(func(i) && func(i*i) && func(i*i*i))
printf("%4d",i);
printf("\n");
return 0;
}
运行结果: