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

Dim t As Integer, s As String, i As Integer

s = "20PYt22hoN"

t = 0

For i = 1 To Len(s)

    c = Mid(s, i, 1)

    If c >= "a" And c <= "z" Then c = Chr(Asc(c) - 32)

        If c >= "A" And c <= "Z" Then

            t = t + 1

        Else

            t = t - 1

    End If

Next i

Text1.Text = Str(t)

执行该程序段后,文本框Text1中显示的内容是(    )

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