#include
void main()
{int i,j,k,s;
for(i=2;i<=10000;i++)
{s=0;
for(j=1;jif(i%j==0) s=s+j;
if(s==i)
{printf("%d 的因子是",i);
for(k=1;kif(i%k==0) printf("%d\n,",k);
}
}
getch();
}
#include
int main()
{
int n=10000;
int r,j,i;
for(i=2;i<=n;i++)
{
r=0;
for(j=1;j if(i%j==0) r=r+j;
if(r==i) printf("%d ",i);
}
return 0;
}
#include
int main() {
int r,j,i;
for(i=2;i<10000; i++){
r = 0;
for(j=1;j if(i%j == 0) r = r + j;
if(r == i) printf("the result is:%d\n",r);
}
return 0;
}