
按照上述规则,小明设计了一个解密的 VB 程序,功能如下:单击“解密”按钮,程序依次将文本框 Text1 中的字符提取,进行解密处理,并输出在文本框 Text2 中,程序效果如图 a 所示,请回答下列问题

(1)要改变 Command1 对象上的字体颜色,可以改变 Command1 对象的
(2)实现上述功能的 VB 程序段如下,请在划线处填入合适的代码。
(3)程序中加框处代码有错,请改正。
Private Sub Command1_Click()
Const n = 100
Dim s As String, ch As String, nm As String
Dim p As Integer, i As Integer, k As Integer, t As Integer
Dim a(1 To n) As Integer
s = Text1.Text
p = 0: k = 0
For i = 1 To Len(s)
ch = Mid(s, i, 1)
If ch >= "0" And ch <= "9" Then
①
Else
If k Mod 2 = 1 Then
②
Else
a(k+1) = p
End If
k = k + 1:p = 0
End If
Next i
a(k + 1) = p * 32 + a(k)
For i =

nm = nm + dtoh(a(i))
Next i
Text2.Text = nm
End Sub
Function dtoh(x As Integer) As String
Const st1 = "0123456789ABCDEF"
Do While x > 0
③
x = x \ 16
Loop
End Function

同类型试题

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

