[求助]VB一道题目 |不知道哪里错了
“完全数”是指一个数恰好等于它的因子之和,如6 的因子为 1 2 3 ,而6 = 1 + 2 + 3,因而6就是完全数,编写程序找出1-1000之间的所有完全数
Private Sub Command1_Click()
Dim j As Integer, i As Integer, s As Long
i = 1
j = 1
s = 0
While i <= 1000
While j <= i - 1
If i Mod j = 0 Then
s = s + j
End If
j = j + 1
Wend
If i = s Then
Print i
End If
i = i + 1
Wend
End if
______________________________________________________________________end
帮忙啊 谢谢