组卷题库 > 高中信息技术试卷库
试题详情
有如下VB程序段:

Private Sub Command1_Click()

    Dim s As String, ch As String

    Dim n As Integer, t As Integer, c As Integer

    s = "Go-2020-12"

    n = Len(s):t = 0

    For i = 1 To n

        ch = Mid(s,i,1)

        If ch >= "0" And ch <= "9" Then

            t = t + Val(ch)

        Else

            c = t: t = 0

        End If

    Next i

    Label1.Caption = Str(c)

End Sub

执行完以上程序段后,标签Label1上显示的内容为(    )

A、7
B、2
C、3
D、4
知识点
参考答案
采纳过本试题的试卷
教育网站链接