Private Sub Command1_Click()
Dim a, b, c
a1 = Val(120)
a = 1
Do While a ^ 2 <= 120 ^ 3
b = 1
Do While b ^ 2 <= 120 ^ 3
c = 1
Do While c ^ 2 <= 120 ^ 3
y = a ^ 2 + b ^ 2 + c ^ 2
If y = 120 ^ 3 Then
s = s & 120 & "^3=" & a & "^2+" & b & "^2+" & c & "^2" & vbCrLf
s1 = s1 + 1
Else
s = s
End If