```
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<math.h>
main()
{
int m[16],n, i, t, a;
for (n = 100; n <= 999; n++) //穷举n的取值范围 *
{
t = 0;
a = n;
for (i = 0; a != 0; i++) //从低到高分解数a的每一位存于数组m[1]--m[16]
{
m[i] = a % 10;
a /= 10;
}
for (i = 0; i < 3; i++)
{
t += pow(m[i], 3);
}
if (t == n)printf("%d ", n);
}
}
```
标签:10,main,16,++,include,水仙花 From: https://www.cnblogs.com/258-333/p/17421688.html