Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim n As Integer
        Dim a As Integer, b As Integer, c As Integer
        For n = 100 To 999
            a = n \ 100                         'a表示百位数
            b = (n \ 10) Mod 10                'b表示十位数
            c = n Mod 10                        'c表示个位数
            If n = a ^ 3 + b ^ 3 + c ^ 3 Then
                TextBox1.Text = TextBox1.Text & n & vbCrLf
            End If
        Next
    End Sub
End Class
