#include<stdio.h>
#include<math.h>
int main()
{
int i,a,b,c;
for(i=100; i<=999; i++)
{
a=i/100;
b=(i/10)%10;
c=i%10;
if(i==pow(a,3)+pow(b,3)+pow(c,3))
printf("%d\t",i);
}
printf("\n");
return 0;
}
水仙花数 (c语言)
最新推荐文章于 2024-04-15 21:23:10 发布