某四位数的千位数与十位数之和等于百位与个位的积,求所有这样四位数的和?
某四位数的千位数与十位数之和等于百位与个位的积,求所有这样四位数的和那位达人 帮忙算一下 谢谢
Private Sub Command1_Click() Dim k As String Dim j As Long Dim cont As Long Dim i1 As Long Dim i2 As Long Dim i3 As Long Dim i4 As Long For i1 = 1 To 9 For i2 = 0 To 9 For i3 = 0 To 9 For i4 = 0 To 9 If i1 + i3 = i2 * i4 Then j = i1 * 1000 + i2 * 100 + i3 * 10 + i4 cont = cont + j k = k & "+" & j End If Next i4 Next i3 Next i2 Next i1 k = Mid(k, 2) k = k & "=" & cont Text1.Text = k MsgBox cont End Sub