请问各位,这个输出所有三位数的水仙花数 的程序 有什么错误
三位数的水仙花数有四个 可是我这个程序只能输出三个 是哪里出问题了?
程序代码:#include <stdio.h>
#include <math.h>
int main ()
{
int a,b,c,d=3;
for (a=1;a<10;a++)
for (b=0;b<10;b++)
for (c=0;c<10;c++)
if (pow(a,d)+pow(b,d)+pow(c,d)==a*100+b*10+c)
printf("%d%d%d ",a,b,c);
return 0;
}








