网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

下列程序段的执行结果为______。 Private Sub Command1_Click() a=1:b=1 Select Case a Case 1 Select Case b Case 0 Print "你好!" Case 1 Print "Hello!" End Select Case 2 Print"谢谢使用!" End Select End Sub

A.你好!

B.谢谢使用!

C.Hello!

D.你好!谢谢使用!


参考答案

更多 “ 下列程序段的执行结果为______。 Private Sub Command1_Click() a=1:b=1 Select Case a Case 1 Select Case b Case 0 Print "你好!" Case 1 Print "Hello!" End Select Case 2 Print"谢谢使用!" End Select End SubA.你好!B.谢谢使用!C.Hello!D.你好!谢谢使用! ” 相关考题
考题 执行下面的程序段,x的值为【 】。Private Sub Command1_Click()For i=1 To 9a=a+iNextx=Val(i)MsgBox xEnd Sub

考题 单击命令按钮时,下列程序的执行结果是Private Sub Command1_Click()BT 4End SubPrivate Sub BT(x As Integer)x=x * 2 + 1If x 6 ThenCall BT(x)End Ifx=x * 2Print x;End Sub( )。A.15B.16C.17D.18

考题 下列程序段的执行结果为a=2b=0Select Case aCase 1Select Case bCase 0Print "**0**"Case 1Print "**1**"End SelectCase 2Print "**2**"End Select( )。A.**0**B.**1**C.**2**D.0

考题 下列程序段的执行结果为m=1n=1Select Case mCase 1Select Case nCase 0Print "**0**"Case 1Print "**1**"End SelectCase 2Print "**2**"End Select( )。A.**0**B.**1**C.**2**D.0

考题 下列程序段的执行结果为a=1b=0Select Case aCase 1Select Case bCase 0Print "* *0* *"Case 1Print "* *1* *"End SelectCase 2Print "* *2* *"End Select ( )。A.* *0* *B.* * 1* *C.* *2* *D.0

考题 窗体上有一个按钮和一个列表框,执行下列程序后的输出结果为【 】。Private Sub Command1_Click()List1.Addltem"China"List1.Addltem"USA"List1.Addltem"Japan",1Print List1.List(2)End Sub

考题 执行下面的程序段,x的值为 。private Sub Command1_Click()For i=1 To 5 a=a+iNext iX=Val(i)msgBox xEnd SubA.5 B.6 C.7 D.8

考题 下列程序的执行后,X的结果为()。 Private Sub Command1_Click( ) x=0 For i=1 to 3 x=1 For j=1 to 4 x=2 For k=1 to 5 x = x + 2 Next k Next j Next i Print x End Sub A. 12B. 24C. 36D. 48

考题 单击命令按钮时,下列程序代码的执行结果为______。 Private Sub Proe1 (n As Integer,ByVa1 m As Integer) n=n Mod 10 m=m\ 10 End Sub Private Sub Command1_Click() Dim x As Integer Dim y As Integer x= 12 y = 34 Call Proe1 (x, y) Print x; y End SubA. 12 34B.2 34C.2 3D.12 3

考题 有如下程序:Private Sub Command1_Click()j =10For i= -1 To 1 Step 0.3j =j + 1Next iPrint jEnd Sub该程序共循环【 】次,程序执行完毕后j的值是【 】。

考题 有如下过程:Sub SS(ByVal X,ByRef Y,Z)X=X + 1Y=Y + 1Z=Z + 1End Sub执行该过程的事件过程如下:Private Sub Command1_Click()A = 1B = 2C = 3Call SS(A,B,C) Print A;B;CEnd Sub则该程序的执行结果是【 】。

考题 下列程序段的运行结果是:Private Sub Command1_Click() Dim n AS Integer I =21: n = 3 do while I>n I=I- n Loop Print IEnd Sub在窗体上打印的结果是______。A.3B.5C.6D.8

考题 有如下程序,运行时从键盘输入3,输出结果是 ______。 Private Sub Command1_Click() a=InputBox("请输入一个数字:") Select Case a Case Is>2 b=a+1 Case Is>3 b=a+2 Case Is>4 b=a+3 Case Is>5 b=a+4 End Select Print a + b End SubA.8B.7C.6D.9

考题 单击命令按钮,并在对话框内输入6,下列程序段的执行结果为______。 Private Sub Command1_Click() Dim n As Integer n=InputBox ("请输入日期") Select Case n Case Is <= 0 n=InputBox("错误!请重新输入日期!") Case Is>7 n=InputBox("错误!请重新输入日期!") Case 1 To 3 Print "江苏" Case 4 To 5 Print "浙江" Case 6 To 7 Print "双休日" End Select End SubA.错误!请重新输入日期!B.江苏C.浙江D.双休日

考题 下列程序的输出结果是【 】。Private Sub Command1_Click()Dim a(1 To 20)Dim iFor i=1 To 20a(i)=iNext iFor Each i In a()a(i)=20Next iPrint a(2)End Sub

考题 以下程序段中Do...Loop 循环执行的次数为【 】。程序执行完毕后,n的值为【 】。Private Sub Command1_Click()n =5DoIf n Mod 2= 0 Thenn =n \2Elsen =n* 3 + 1End IfLoop Until n=1End Sub

考题 下列程序段,运行后窗体上输出结果是( )。Private Sub Command1_Click()a=5:b=4:c=3:d=2x=3>2*b Or a=c And b<>c Or c>dPrintxEnd SubA.1B.TrueC.FalseD.2

考题 单击命令按钮时,下列程序的执行结果是 Private Sub Command1_Click() BT 4 End Sub Private Sub BT(x As Integer) x=x*2+1 If x<6 Then Call BT(x) End If x=x*2 Print x; End SubA.15B.16C.17D.18

考题 执行下列程序,输入框中显示的默认字符串为【 】。Private Sub Command1_Click( )InputBox "Ok" , "输入参数", Format(" H12" )End Sub

考题 下列程序段的执行结果为______。 Private Sub Command1_Click() n = 0 For a = 1 To 20 For b = 1 To 20 For c = 1 To 20 If a * a + b * b - c * c Then n=n+l End If Next c Next b Next a Print n End SubA.9B.12C.10D.11

考题 下列程序段的执行结果为m=1n=1Select Case mCase 1Select Case nCase 0print "A"Case 1Print "B"End SelectCase 2Print "C"End SelectA.AB.BC.CD.0

考题 下列程序的输出结果是( )。Private Sub Command1_Click()Dim arr(1 To 10)For i=1 To 10Next iFor Each i In arr()Next iEnd Sub

考题 下列程序段运行后窗体上输出结果为( )。 Private Sub Command1_Click() a=5: b=4: c=3: d=2 x=3>2*b Or a=c And b<>c Or c>d Print x End SubA.1B.TrueC.FalseD.2

考题 在窗体上画了两个按钮控件Command1和Command2,有如下程序: Private Sub Command1_Click() Print "Visual"; End Sub Private Sub Command2_Click() Print "Basic"; End Sub Private Sub Form_Load() CommandCancel=True Command1.Cancel=True End Sub 执行程序后,按键盘Cancel键,在窗体上输出的结果是A.BasicB.VisualC.CancelD.True

考题 单击命令按钮时,下列程序段的执行结果为( )。 Public Sub Procl(n As Integer,ByVal m As Integer) n=n Mod 10 m=m\10 End Sub Private Sub Command1_Click() Dim x As Integer,y As Integer x=12;y=34 Call Procl(x,y) Print x;y End SubA.12 34B.2 34C.2 3D.12 3

考题 单击命令按钮时,下列程序段的执行结果为( )。 Private Sub Command1_Click() Dim FirstStr As String FirstStr="abcdef" Print PickMid(FirstStr) End Sub Private Function PickMid(xStr As String)As String Dim tempStr As String,strLen As Integer TempStr=" " strLen=Len(xStr) i=1 Do While i<=strLen/2 tempStr=tempStr+Mid(xStr,i,1)+Mid(xStr,strLen-i+1,1) i=i+1 Loop PickMid=tempStr End FuncfionA.abcdefB.fedC.fedcbaD.defabc

考题 下列程序执行的结果是______。 Private Sub Command1_Click() x=25 If x>0 Then y=1 If x>10 Then y=2 If x>20 Then y=3 If x>30 Then y=4 Print y End SubA.1B.2C.3D.4