#include <stdio.h>
#include <stdlib.h>
int is (int);
int main ()
{
int a,b,c,d;
printf ("请输入两个1~1000的整数:\n");
scanf ("%d %d",&a,&b);
for (c=a;c<=b;c++)
{
if (is (c))
{
printf ("%d",c);
}
}
system ("pause");
}
int is (int a)
{
int b,e=0;
for (;a>0;)
{
b=a%10;
e=e+b*b*b;
}
if (e==a){
return 1;
}
else
{
return 0;
}
}
请问我哪里出错了?
哦哦,我懂了,忘记对a进行处理了,很感谢你。
本回答被提问者采纳