#include
#include
#include
int main()
{
int top,mid,end;
int n;
for(n=100;n<1000;n++){
top=n/100;
mid=n/10%10;
end=n%10;
if(n==pow(top,3)+pow(mid,3)+pow(end,3)){
printf("水仙花数:%d\n",n);
}
}
return 0;
}
![图片说明](https://img-ask.csdn.net/upload/201903/19/1553005531_864862.png)
```如果将pow(top,3)与pow(end,3)调换又可以输出全部三位数的水仙花数,还有乱码是神马情况啊?求教