int main(void)
{ unsigned long intnumber_1=0ul; unsigned long intnumber_2=0ul; unsigned long intlimits=0ul; unsigned long intindex=0ul;sum1=1ul;sum2=1ul; printf("PLease Enter The limits You Want To Find In:\n"); sanf("%ld",&limits); for(number_1=3ul;number_1<=limits;number_1++) { for(index=2ul;index<=number_1/2;index++) if(number_1%index==0) sum1+=index; number_2=sum1; for(number_2;number_2<=limits;number_2++) for(index=2ul;index<=number_2/2;index++) if(number_2%index==0) sum2+=index; if(sum2==number_1) printf("\n\"%ld AND %ld\","number_1,number_2); } return 0;
}
没有调试,自己试试看吧!如有建议期待你的邮件,邮箱:situjinxian@