如字符串“ABDAC”与字符串“AABCD”可以归为同一类,与“AABBC”不可以归为同一类。图图编写了一VB程序,功能如下:在文本框Text1中输入字符串s1,在文本框Text2中输入字符串s2,单击“判断”按钮Command1,在标签Label1中显示是否可以归为同一类的结果。部分运行界面如图所示。
请回答下列问题:
Private Sub Command1_Click()
Dim a(1 To 100) As Boolean
Dim i As Integer, j As Integer
Dim flag As Boolean
s1 = Text1.Text
s2 = Text2.Text
flag = True
For i = 1 To Len(s2)
Next i
If Len(s1) <> Len(s2) Then
flag = False
Else
For i = 1 To Len(s1)
c =
j = 1
Do While j <= Len(s2)
If Then
a(j) = False
Exit Do
End If
Loop
If j = Len(s2) + 1 Then flag = False
Next i
End If
If flag Then
Label1.Caption = "可以归为同一类"
Else
Label1.Caption = "不可归为同一类"
End If
End Sub