package studay;
public class WanShu {
static int i;
static int j;
static int sum=0;
public static void main(String[] args) {
// TODO Auto-generated method stub
for(i=1;i<=1000;i++) {
sum=0;
for(j=1;j<i;j++) {
if(i%j==0) {
sum+=j;
}
}
if(i==sum) {
System.out.println("1000之内的完数有"+sum);
}
}
}
}