#include<stdio.h>
#include<math.h>
void main()
{
int i;
int x, y, z;
for (i = 100; i < 1000; i++)
{
x = i % 10;
y = i % 100 / 10;
z = i / 100;
if (pow(x, 3) + pow(y, 3) + pow(z, 3) == i)
printf("%d\n", i);
}
}
C语言输出所有的水仙花数
猜你喜欢
转载自blog.csdn.net/qq_42052733/article/details/104504678
今日推荐
周排行