判断是否为水仙花数,并求出两个数之间的所有水仙花数
int narcissistic( int number ){
int a,b,c;
a=number%10;
b=number/10%10;
c=number/100;
if(number==a*a*a+b*b*b+c*c*c){
return 1;}
else return 0;
}
void PrintN( int m, int n )
{
int i,g,h,o;
for(i=m+1;i<n;i++,100<=m&&m<=n&&n<=1000){
if(narcissistic(i))
/*g=i%10;
h=i/10%10;
o=i/100;
if(i==g*g*g+h*h*h+o*o*o)*/
printf("%d\n",i);
}
}