
(1)实现上述功能的VB程序如下,请在划线处填入合适的代码。
Private Sub Command l_Click()
Dims As String,ch As String
Dim i As Integer,t As Integer
Di mans As Long,px As Long
s=Text l.Text
ans=0:t=0:px= 1
For i=1 To Len(s)
ch=Mid(s,i,1)
If_______Then
t=t*10+Val(ch)
Elsepx=px*t
If ch="+"Then ans=ans+px px=1 End If |
_______
px=-1
End If
t=0
End If
Next i
Label 1.Caption=Str(ans+_______)
End Sub
(2)若删除加框处代码,在文本框Text l中输入表达式“3-2+2*3”,程序运行结束时标签Label l中显示的内容为______。

同类型试题

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

