请问哪有问题,大神们来看一眼感谢!!!
#include <stdio.h>
int main()
{
int num,a,b,c;
for(a=0,b=0,c=0;num<1000;num++)
{
a = num/100;
b=num/10%10;
c=num%10;
num == a*a*a+b*b*b+c*c*c;
}
printf("所有水仙花数为%d\n",num);
return 0;
}
#include <stdio.h>
int main()
{
int num,a,b,c;
for(a=0,b=0,c=0;num<1000;num++)
{
a = num/100;
b=num/10%10;
c=num%10;
num == a*a*a+b*b*b+c*c*c;
}
printf("所有水仙花数为%d\n",num);
return 0;
}
2020-02-25
举报