#include<stdio.h>
int main(void)
{
/*********Begin*********/
int x,a,b,c,t;
x=100;
while(x<1000)
{
c=x%10;//个位
t=x/10;
b=t%10;//十位
a=t/10;//百位
if(a*a*a+b*b*b+c*c*c==x)
{
printf("%d ",x);
}
x++;
}
/*********End**********/
return 0;
}
C语言输出水仙花数
最新推荐文章于 2024-07-25 17:33:54 发布