Private Sub Command1_Click()
Dim j As Integer, i As Integer, s As Long
i = 1
j = 1
s = 0 →--------------------|-
While i <= 1000 ↓ 好久没来看了 谢谢你们回答,我早知道了,每次S要清0
←-------------------------- |
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
Dim j As Integer, i As Integer, s As Long
i = 1
j = 1
s = 0 →--------------------|-
While i <= 1000 ↓ 好久没来看了 谢谢你们回答,我早知道了,每次S要清0
←-------------------------- |
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