Const n = 15
Private Sub Command1_Click()
Dim a(1 To n) As Integer '数组a存放不同颜色袜子的数量,默认值为0
Dim s As String, ch As String
Dim c As Integer, i As Integer, t As Integer
List1.Clear
s = Text1.Text
t = 0 :c = 0 : i = 1
Do While i <= Len(s)
ch = Mid(s, i, 1)
If ch >= "0" And ch <= "9" Then
t = t * 10 + Val(ch)
Else
a(t) = ①
t = 0
End If
i = i + 1
Loop
For i = 1 To n
If ② Then List1.AddItem "落单袜子的颜色为" + Str(i)
c =
Next i
Label1.Caption = "能配对的袜子有" + Str(c) + "双"
End Sub
请回答下列问题:
① ②