Dim a(0 To 10)As String
s= Text1.Text
a(0)="": a(1)= Mid(s, 1,1): t=1
For i= 2 To Len(s)
If t>= 1 And Mid(s, i, 1)= a(t) Then
t=t- 1
Else
t=t+1: a(t)= Mid(s, i, 1)
End If
Next i
运行程序段,在文本框Text1中输入以下字符串,运行后变量t的值与其它三项
A.AABAB | B.AAABA | C.BAABA | D.BBABA |

同类型试题

y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2


y = sin x, x∈R, y∈[–1,1],周期为2π,函数图像以 x = (π/2) + kπ 为对称轴
y = arcsin x, x∈[–1,1], y∈[–π/2,π/2]
sin x = 0 ←→ arcsin x = 0
sin x = 1/2 ←→ arcsin x = π/6
sin x = √2/2 ←→ arcsin x = π/4
sin x = 1 ←→ arcsin x = π/2

