Private Sub form_click()
Dim a As Integer, b As Integer, c As Integer
Dim i As Integer
For i = 100 To 999
a = Mid(i, 1, 1)
b = Mid(i, 2, 1)
c = Mid(i, 3, 1)
If i = a ^ 3 + b ^ 3 + c ^ 3 Then Print i;
Next i
End Sub
不用你说的那么复杂,一个循环就可以搞定了。
Private Sub form_click()
Dim a As Integer, b As Integer, c As Integer
Dim i As Integer
For i = 100 To 999
a = Mid(i, 1, 1)
b = Mid(i, 2, 1)
c = Mid(i, 3, 1)
If i = a ^ 3 + b ^ 3 + c ^ 3 Then Print i;
Next i
End Sub
不用你说的那么复杂,一个循环就可以搞定了。