(2)
请在划线处填入合适的代码。
Function getmin(a As Integer,
b As Integer) ’获取两个整数的较小者
If a < b Then getmin = a Else getmin = b
End Function
Private Sub Command1_Click()
Dim s1 As String, s2 As
String, i As Integer, j As Integer, x As Integer, y As Integer
Dim cnt As Integer, ans
As Integer, len1 As Integer, len2 As Integer
s1=Text1.Text
s2=Text2.Text
len1=Len(s1)
len2=Len(s2)
minlen =________ ‘minlen中保存s1和s2中较短字符串的长度
ans = 0
For i = 1 To len1
For j = 1 To len2
cnt = 0: x = i: y = j
Do While________And
cnt < minlen
cnt = cnt
+ 1
x = x Mod
len1 + 1
y = y Mod
len2 + 1
Loop
If________Then
ans = cnt
Next j
Next i
Label3. Caption = Str(ans)
End Sub