请在划线处填入合适的代码。
Dim n As Integer, Getstr As String
Private Sub Command1_Click()
Dim i As Integer, j As Integer, mAs Integer
n = Val(Text1.Text)
Getstr = ""
For i = 0 To 2 ^ n -1
m = i
If Then
For j = 1 To n
If m Mod 2 = 0 Then
Getstr = "女" + Getstr
Else
Getstr = "男" + Getstr
End If
m = m \2
Next j
List1.AddItem Getstr
If Team(Getstr) <> "" Then List2.AddItem (Team(Getstr))
Getstr =""
End If
Next i
End Sub
Function search(i As Integer) As Boolean '判读男生是否相邻
Dim j As Integer,t As Integer
Dim a(1 To 15) As Integer
t = i
For j = 1 To n
a(j) = t Mod 2
t = t \2
Next j
flag = True
For k = 1 To n -1
If Then flag = False: Exit For
Next k
search = flag
End Function
Function Team(ch As String) As String '判读男女生比例是否合适
Dim num As Integer, st As Integer, i As Integer,c(0 To 1) As Integer
Team = “”
For i = 0 To 1
c(i) = 0
Next i
For i = 1 To n
st= Mid(ch, i, 1)
If st= "男" Then num=1: c(num)= c(num)+1 Else num =0: c(num)= c(num)+1
Next i
IfThen Team = ch
End Function