求给定范围内的水仙花数
#include<stdio.h>
int main()
{
int m,n,i,a,b,c,z,d;
while(scanf("%d%d",&m,&n)!=EOF)
{
d=0;z=0;
if(m>=100&&m<=999&&n>=100&&n<=999&&m<=n)
{
z=0;
for(i=m;i<=n;i++)
{
a=i/100;
b=i%100/10;
c=i%10;
if(i==a*a*a+b*b*b+c*c*c)
{
d=d+1;
if(z==0)
{
printf("%d",i);
z=z+1;
}
else
printf(" %d",i);
}
}
if(d==0)
printf("no\n");
else
printf("\n");
}
else continue;
}
return 0;
}