网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
设有如下程序:OptionBase1PrivateSubForm_Click()Dima(10),P(3)AsIntegerk=5Fori=1To10a(i)=iNextiFori=1To3P(i)=a(i*i)NextiFori=1To3k=k+P(i)*2NextiPrintkEndSub程序运行后,单击窗体,则在窗体上显示的是( )
A、33
B.35
C.37
D.38
参考答案
更多 “ 设有如下程序:OptionBase1PrivateSubForm_Click()Dima(10),P(3)AsIntegerk=5Fori=1To10a(i)=iNextiFori=1To3P(i)=a(i*i)NextiFori=1To3k=k+P(i)*2NextiPrintkEndSub程序运行后,单击窗体,则在窗体上显示的是( ) A、33B.35C.37D.38 ” 相关考题
考题
设有如下程序:Option Base 0Private Sub Form_Click()Dim aDim I As Integera=Array(1,2,3,4,5,6,7,8,9)For I=0 To 3Print a(5 – I);Next IEnd Sub程序运行后,单击窗体,则在窗体上显示的是( )。
A.4321B.5432C.6543D.7654
考题
( 10 )在窗体上有一个命令按钮 Commandl ,编写事件代码如下:Private Sub Command1_Click()Dim a(10), p(3) As Integerk = 5For i = 1 To 10a(i) = i * iNext iFor i = 1 To 3p(i) = a(i * i)Next iFor i = 1 To 3k = k + p(i) *2Next iMsgBox kEnd Sub打开窗体运行后,单击命令按钮,消息框中输出的结果是 【 10 】 。
考题
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程:Option Base 1Private Sub Command1_Click()Dim aa= Array(1,2,3,4,5)For i=1 To UBound(a)a(i)= a(i)+i-1NextPrint a(3)End Sub程序运行后,单击命令按钮,则在窗体上显示的内容是( )。A.4B.5C.6D.7
考题
在窗体上添加一个命令按钮,然后编写如下事件过程: Phvate Sub Commanl_Click() Dima(10)As Integer Dimp(3)As InteSer k=5 Fori=1 To 10 a(i)=i Nexti Fori=1 To 3 p(i)=a(i*i) Nexti Fori=1 To 3 k=k+p(i)*2 Nexti Printk End Sub 该程A.35B.33C.31D.29
考题
设有如下程序:Private Sub Form_Click()Dim i As Integer,x As String,Y As Stringx=”ABCDEFG”For i=4 To 1 Step-1y=Mid(x,i,i)+yNext iPrint yEnd Sub程序运行后,单击窗体,输出结果为A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
设有如下程序:Private Sub Form_Click()Dim ary(1 To 5)As IntegerDim i As IntegerDim sum As IntegerFor i=1 To 5ary(j)=i+1sum=sum+ary(i)Next 1Print sumEud Sub程序运行后,单击窗体,则在窗体上显示的是A.15B.16C.20D.25
考题
有如下程序:Option Base 1Private Sub Form_Click()Dim arr,SumSum=0For i=1 To 10If arr(i)/3=arr(i)\3 ThenEnd IfNext iEnd Sub程序运行后,单击窗体,消息框的输出结果为( )。
考题
在窗体上有一个命令按钮Commandl,编写事件代码如下:Private SuB commandl_Click()Dim a(10),p(3)As Integerk=5For i=1 To 10a(i)=i+iNext iFor i=1 To 3P(i)=a(i*i)Next iFor i=1 To 3k =k+p(i)*2Next iMsgBox kEnd SuB打开窗体运行后,单击命令按钮,消息框中输出的结果是【 】。
考题
设有如下程序:Private Sub Form. Click( )Dim ary(1 To 5)As IntegerDim i As IntegerDim sum As IntegerFor i=1 To 5ary(i)=i+lsum=sum+ary(i)Next iPrint sumEnd Sub程序运行后,单击窗体,则在窗体上显示的是( )。A.15B.16C.20D.25
考题
在窗体画一个命令按钮,然后编写如下事件过程:Private Sub Command1_CIick()Dim a(1 To 10)Dim p(1 To 3)k=5For i =1 To 10a(i)=iNext iFor i=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。
考题
设有如下程序: Private Sub Form. Click( ) Dim i As Integer,x As String,y As String x="ABCDEFG" For i=4 To 1Step-1 y=Mid(X,i,i)+y Next i Print y End Sub 程序运行后,单击窗体,输出结果为( )。A.ABCCDEDEFGB.AABBCDEFGC.ABCDEFGD.AABBCCDDEEFFGG
考题
设有如下程序: Private Static Function Fac(n As Integer)As Integer Dim f As Integer f=f+n Fac=f End Function Private Sub Form_Click( ) Dim I As Integer For 1=2 To 3 Print"#";I“=”Fac(1) Next I End Sub 程序运行后,单击窗体,在窗体上显示的是A.#2=2 #3=3B.#2=2 #3=5C.#;2=2 #;3=3D.#;2=2 #3;=5
考题
设有如下程序: Private Sub Form_Click() A=1 For i=1 To 3 Select Case i Case 1,3 A=A+1 Case 2,4 A=A+2 End Select Next i Print A End Sub 程序运行后,单击窗体,则在窗体上显示的内容是A.6B.5C.4D.3
考题
设有如下程序: Option Base 1 Private Sub Form. Click() Dim arr arr = Array(10, 20, "ABCDE") For i = 3 To 1 Step -1 Print arr(i); Next i End Sub程序运行后,单击窗体,在窗体上显示的内容为______。A.ABCDE 20 10B.10 20 ABCDEC.ABCDE 10 20D.出错信息
考题
在窗体上画一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() x = 0 n=InputBox(" ") For i = 1 To n For j=1 To i x = x + 1 Next i Next i Print x End Sub 程序运行后,单击命令按钮,如果输入3,则在窗体上显示的内容是A.3B.4C.5D.6
考题
设有如下程序: Option Base 0 Private Sub Form Click() Dim a Dim i As Integer a = Array(1, 2, 3, 4, 5, 6, 7, 8, 9) For i = 0 To 3 Print a(5 - i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是A.4 3 21B.543 2C.6 54 3D.7 6 54
考题
设有如下程序: Private Sub Form. Click( ) Cls a$="1234j6" For i=1 To 6 Print Tab(12-i);________ Next i End Sub 程序运行后,单击窗体,要求结果如图所示,则在______处填入的内容为( )。A.Left(a$,i)B.Mid(a$,8-i,i)C.Right(a$,i)D.Mid(a$,7,i)
考题
Private Sub Commandl Click()Dim i As Integer, j As IntegerDim a (10,10)As IntegerFor i=1 To 3For j= i To 3a(i,j)=(i-1)*3+jPrint a (i,j);Next jPrintNext iEnd Sub程序运行后,单击命令按钮,窗体上显示的是( )。
考题
在窗体上画一个命令按钮,名称为Command1,然后编写如下程序: Private Sub Command1_Click() For i=1 To 2 For j=1 To i Print String(i,"Hello") Next j Print Next i End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.H HH HHB.H HHHHC.HHHHH HH HHHHD.H
考题
设有如下程序:Private Sub Form_Click()Clsa$=”123456”For i=1 To 6Print Tab(12-i);_____Next iEnd Sub程序运行后,单击窗体,要求结果如图所示,则在_____处应填入的内容为A.Left(a$,i)B.Mid(a$,8-i,i)C.Right(a$,i)D.Mia(a$,7,i)
考题
设有如下程序: Private Sub Form. Click( ) Dim ary(1 To 5)As Integer Dim i As Integer Dim sum As Integer For i=1 To 5 ary(i)=i+l sum=sum+ary(i) Next i Print sum End Sub 程序运行后,单击窗体,则在窗体上显示的是( )。A.15B.16C.20D.25
考题
在窗体上画一个命令按钮,名称为Command1。然后编写如下程序: Private Sub Command1_Click() Dim i As Integer,a As Integer Do While i<20 Do While True If i Mod 10=0 Then Exit Do Else i=i-1 End If Loop i=i+11 a=a+i Loop Printa End Sub程序运行后,如果单击命令按钮,则在窗体上显示的内容是( )。A.21B.32C.33D.11
考题
设有如下程序: Private Sub Form_ Click() Dim a Dim i As Integer, j As Integer a = Array(1, 2, 3, 4, 5, 6, 7, 8, 9) For i = 0 To 3 Print a(5 - i) Next End Sub程序运行后,单击窗体,则在窗体上显示的是______。。A.4 3 2 1B.5 4 3 2C.6 5 4 3D.7 6 5 4
考题
设有如下程序: Option Base 0 Private Sub Form_Click() Dim a Dimi As Integer a=Array(1, 2, 3, 4, 5, 6, 7, 8, 9) For i=0 To 3 Print a(5-i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是______。A.4 3 2 1B.5 4 3 2C.6 5 4 3D.7 6 5 4
考题
在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Commandl_Click()Dim a (1 To 10)Dim p(1 To 3)k=5For i=1 To 10a(i)=iNextiFori=1 To 3p(i)=a(i*i)Next iFor i=1 To 3k=k+p(i)*2Next iPrint kEnd Sub程序运行后,单击命令按钮,输出结果是【 】。
考题
设有如下程序: Option Base 0 Private Sub Form_Click( ) Dim a Dim i As Integer a = Array(1,2,3,4,5,6,7,8,9) For i = 0 To 3 Print a(5 – i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是()A、4;3;2;1B、5;4;3;2C、6;5;4;3D、7;6;5;4
考题
单选题设有如下程序: Option Base 0 Private Sub Form_Click( ) Dim a Dim i As Integer a = Array(1,2,3,4,5,6,7,8,9) For i = 0 To 3 Print a(5 – i); Next End Sub 程序运行后,单击窗体,则在窗体上显示的是()A
4;3;2;1B
5;4;3;2C
6;5;4;3D
7;6;5;4
热门标签
最新试卷