vb 四位数。0000-9999 建text1.text。text2.text 一个按钮, text1输入几,text2.text输出
vb四位数。0000-9999建text1.text。text2.text一个按钮,text1输入几,text2.text输出所有符合,各个位置的数相加等于text1的所...
vb 四位数。0000-9999 建text1.text。text2.text 一个按钮, text1输入几,text2.text输出所有符合,各个位置的数相加等于text1的所有四位数组合。
例:text1.text 输入1,点按钮,输出0001 0010 0100 1000
大侠们帮帮我,急!!!! 展开
例:text1.text 输入1,点按钮,输出0001 0010 0100 1000
大侠们帮帮我,急!!!! 展开
展开全部
'将Text2的MultiLine属性设置为True
Private Sub Command1_Click()
Dim I As Integer
I = Val(Text1)
If I > 36 Or I < 1 Then
MsgBox "请输入大于0并且小于37的整数!"
Exit Sub
End If
Text2 = ""
FenJie I
End Sub
Private Sub FenJie(Beifjs As Integer)
Dim I As Integer, J As Integer, K As Integer, L As Integer, M As Integer
M = 1
For I = 0 To 9
For J = 0 To 9
For K = 0 To 9
For L = 0 To 9
If I + J + K + L = Beifjs Then Text2 = Text2 & " " & I & J & K & L
Next L, K, J, I
End Sub
Private Sub Command1_Click()
Dim I As Integer
I = Val(Text1)
If I > 36 Or I < 1 Then
MsgBox "请输入大于0并且小于37的整数!"
Exit Sub
End If
Text2 = ""
FenJie I
End Sub
Private Sub FenJie(Beifjs As Integer)
Dim I As Integer, J As Integer, K As Integer, L As Integer, M As Integer
M = 1
For I = 0 To 9
For J = 0 To 9
For K = 0 To 9
For L = 0 To 9
If I + J + K + L = Beifjs Then Text2 = Text2 & " " & I & J & K & L
Next L, K, J, I
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询