1. 有如下VB程序段:

Private Sub Command1_Click( )

    Const s1 = "tea"

    s2="老师Happy Teacher's Day!":s3 = ""

    For i=1 To Len(s2)

        If bjiao(s1,Mid(s2, i, 1))Then s3=s3 + Str(i) + ","

    Next i

    Text1.Text = s3

End Sub

Function bijiao(x As String, y As String) As Boolean

    bjiao = False

    For i=1 To Len(x)

        If y = Mid(x, i, 1) Then

           bijiao = True:Exit Function

        End If

    Next i

End Function

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

A. 6,11,12,13,16,22 B. 6,12,13,16,22 C. 4,9,10,11,14,20 D. 4,10,11,14,20
【考点】
过程与自定义函数;
【答案】

您现在未登录,无法查看试题答案与解析。 登录
单选题 普通
能力提升
变式训练
拓展培优
换一批