中国大学MOOC:若有如下程序,在文本框中输入“VisualBasic”,程序运行后Label1显示的是__________。Dims$,ch$,k%s=Fork=1TOLen(Text1.Text)ch=Mid(Text1.Text,k,1)s=ch+sNextkLabel1.Caption=s
举一反三
- 中国大学MOOC: 若有如下程序,在文本框中输入“VisualBasic”,程序运行后Label1显示的是__________。 Dim s$,ch$,k%s=For k=1 TO Len(Text1.Text) ch = Mid(Text1.Text,k,1) s = ch+sNext kLabel1.Caption = s
- 下面程序的输出结果是 Private Sub Command1_Click() ch$="ABCDEF" proc ch Print ch End Sub Private Sub proc(ch As String) S="" For k=Len(ch) To 1 Step-1 s=s & Mid(ch,k,1) Next k ch=s End Sub
- 下面程序的输出结果是( )Private Sub proc(ch As String) s = "" For k = Len(ch) To 1 Step -1 s = s & Mid(ch, k, 1) Next k ch = sEnd SubPrivate Sub Command1_Click() ch$ = "ABCDEF" proc ch Print ch End Sub A: ABCDEF B: A C: FEDCBA D: F
- 中国大学MOOC: 如下程序的功能是删除文本框Text1中的数字字符。请在_________处填入适当的内容,完善程序。Private Sub Command1_Click() Dim i%, s$, c$ s = "" For i = 1 To Len(Text1.Text) c = Mid(Text1.Text, i, 1) If _________ Then s = s + c End If Next Text1.Text = sEnd Sub
- 设有如下事件过程:Private Sub Command1_Click() ch = "ABCDEFG" n = Len(ch) k = 1 Do Print Mid(ch, k, 1); Mid(ch, n, 1); k = k + 1 n = n - 1 Loop Until k > nEnd Sub运行此过程所产生的输出是 A: AGBFCEDD B: AGBFCED C: GFEDCBA D: GAFBECD