题型:综合题 题类:常考题 难易度:普通
浙江省宁波市北仑中学2018-2019学年高一上学期信息技术期中考试试卷
Private Sub Command1_Click()
Dim a As Single, b As Single, ch As String
a = Val(Text1.Text)
b = Val(Text2.Text)
If ch = "+" Then
Text4.Text = Str(a + b)
ElseIf ch = "*" Then
Text4.Text = Str(a * b)
ElseIf ch = "-" Then
Text4.Text = Str(a - b)
ElseIf ch = "/" Then
If Then Text4.Text = Str(a / b) Else Text4.Text = "除数不能是零"
Else
End If
End Sub
试题篮