Sub Main()
Dim tmp As Integer, i As Integer, j As Integer, k As Integer
For i = 1 To 9
For j = 0 To 9
For k = 0 To 9
tmp = (i * 100 + j * 10 + k)
If tmp = i ^ 3 + j ^ 3 + k ^ 3 Then
Console.Write(Str(tmp) + vbTab)
End If
Next
Next
Next
Console.WriteLine()
Console.ReadKey()
End SubSub Main()
Dim num As Integer, i As Integer, j As Integer, k As Integer
For num = 100 To 999
i = Int(num / 100)
j = Int((num - i * 100) / 10)
k = num - i * 100 - j * 10
If i ^ 3 + j ^ 3 + k ^ 3 = num Then Console.Write(Str(num) + vbTab)
Next
Console.WriteLine()
Console.ReadKey()
End Sub
153,370,371,407