s = Text1.Text
If Mid(s, 1, 1) = "(" Then flag = True Else flag = False
cnt = 0: sum = 0
For i = 2 To Len(s)
c = Mid(s, i, 1)
If flag = True Then
If c >= "a" And c <= "z" Then
sum = sum + 1
Else
If sum <> 0 Then cnt = cnt + 1: sum = 0
End If
End If
If c = "(" Then flag = True
If c = ")" Then flag = False
Next i
文本框Text1的内容为一串只包含小写字母、左右括号和空格的字符串“(we can) do (better) we (should (be )better)”,执行程序段后,变量cnt的值为( )