没有报错,正常运行
代码哪错了,为什么输出为空?
代码哪错了,为什么输出为空?
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a, b, c,number;
printf("水仙花数有: \n");
for (a=1; a <= 9; a++)
for (b=0; b <= 9; b++)
for (c=0; c <= 9; c++)
{
number = a * 100 + b * 10 + c;
if (number==a * a * a + b * b * b + c * c * c)
printf("%d\n", number);
}
return 0;
}