【c++编程】采用循环的二重嵌套求400之内的亲密对数
【c++编程】采用循环的二重嵌套求400之内的亲密对数
日期:2016-08-21 09:33:03 人气:1
#include //int main() { int a,b,c,i,sum; for (a=1; a<=400; a++){ sum = 1; for (i=2; i<=a/2; i++){ if(a%i==0)sum += i; } b = sum; sum = 1; for (i=2; i<=b/2;