当前位置: 高中信息技术 / 单选题
  • 1. 有如下程序段:

    Function delStr (S As String, m As Integer) As String

        Dim n As Integer:n = Len(S)

        If m <1 Or m > n Then delStr = "输入位置有误!"

        If m = 1 Then delStr = Mid(S, 2, n-1)

        If m < n Then delStr = Mid(S, 1, m-1)+Mid(S, m+1, n-m)

        If m = n Then delStr = Mid(S, 1, n-1)

    End Function

    Private Sub Command1_ Click()

        Dim S As String:Dim i As Integer

        S = Text1.Text

        For i = 1 To 10 Step 2

            S = delStr(S, i)

        Next i

        Text2. Text = S

    End Sub

    文本框Text1中输入Happybirthday,执行该程序段,文本框Text2中显示的是(      )

    A . apybrtda B . apbrhday C . Happybirhday D . Day

微信扫码预览、分享更方便