#include <stdlib.h>
int main()
{
int x,p;
int a,b,c,e;
for(x=-9999;;x++)
{
a=x/1000;
b=(x/100)%10;
c=(x%100)/10;
e=(x%100)%10;
p=a*a*a+b*b*b+c*c*c+e*e*e;
if(x==p)
printf("%d\n",x);
}
知识点
1学会循环
心得体会
1注意这里并不是从1开始的不然就没有0及其以下的
是不是我想太多 0 及其以下的就不要了