#include
#include
int main()
{
int i, k, m, t;
for (i = 100; i < 1000; i++)
{
t = 0; k = i;
while (k > 0)
{
m = k % 10;
t += m * m * m;
k /= 10;
}
if (t == i)
printf("%dn", t);
}
system("pause"); //避免窗口一闪而退
return 0;
}
#include
#include
int main()
{
int i, k, m, t;
for (i = 100; i < 1000; i++)
{
t = 0; k = i;
while (k > 0)
{
m = k % 10;
t += m * m * m;
k /= 10;
}
if (t == i)
printf("%dn", t);
}
system("pause"); //避免窗口一闪而退
return 0;
}