(1)要使窗体Form1标题显示“数制转换”,则需修改窗体的
(2)实现上述功能的VB程序如下,请在划线处填入合适代码。
Private Sub Command1_Click()
Dim x As String, ch As String
Dim flag As Boolean, i As Integer, result As Long
x=
i=1
result=0
flag=True
ch=Mid(x,1,1)
Do While i <=Len(x) And flag=True
If ch>= “0” And ch<= “9” Then
result=result * 16+Val(ch)
ElseIf ch>= “A” And ch <= “F” Then
result=result * 16+(Asc(ch)-Asc (“A”)+10)
ElseIf ch>= “a” And ch <= “f” Then
result=result * 16+(Asc(ch)-Asc (“a”)+10)
Else
flag=False
End If
i=i+1
ch=
Loop
If flag=True Then
Label3.Caption=Str(result)
Else
Label3.Caption= “输入错误”
End If
End Sub
(3)若在文本框Text1中输入5+9,单击“转换”按钮后,标签Label3中显示的内容是
同类型试题
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