题型:综合题 题类:常考题 难易度:普通
浙江省高中信息技术——VB基础知识
Private Sub Command1 _Click( )
Dim key As String
Dim a As Integer, b As Integer, ans As Integer, ch As String
key =Text1.Text
i=1
Do While i <= Len (key)
ch Mid(key, i, 1)
If ch>= “0” And ch < = “9” Then
①
Else
Exit Do ‘退出循环
End If
Loop
a= ②
b= Val (Mid(key,+1, Len (key)-i))
ans =a +b
Label1. Caption= “算式计算结果为: “+str(ans)
End Sub
① ②
试题篮