[单选题]

运行下列程序:

Option Base 1

Private Sub Form_Click()

y = 43

x = Array(21, 4, 50, 18, 23, 44, 87, 32, 67, 70)

F.or i = 1 To 10

If x(i)< y Then

z = x(i) + 1

y = x(i)

E.lse

z = z + y

E.nd If

Next i

Print z

E.nd Sub

单击窗体后,则在窗体上显示的结果是()。

A.43

B.21

C.37

D.44

参考答案与解析:

相关试题

阅读程序: Option Base 1 Private Sub Form_Cli

[单选题]阅读程序: Option Base 1 Private Sub Form_Click( ) Dim arr,Sum Sum=0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub程序运行后,单击窗体,输出结果为A.13B.14C.27D.15

  • 查看答案
  • 有如下程序:Option Base 1 Private Sub Form_Cli

    [主观题]有如下程序:Option Base 1Private Sub Form_Click()D.im arr,SumSum=0F.or i=1 To 10If arr(i)/3=arr(i)/3 ThenE.nd IfNext iE.nd Sub程序运行后,单击窗体,消息框的输出结果为( )。

  • 查看答案
  • 有如下程序:Option Base 1Private Sub Form. Cli

    [单选题]有如下程序: Option Base 1 Private Sub Form. Click() Dim arr,Sum Sum=0 alt=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A. 25B.26C.27D.28

  • 查看答案
  • 设有如下程序:Option Base 0Private Sub Form_Cli

    [单选题]设有如下程序: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 End Sub程序运行后,单击窗体,则在窗体上显示的是()A . 4;3;2;1B . 5;4;3;2C . 6;5;4;3D . 7;6;5;4

  • 查看答案
  • 阅读程序:Option Base 1Private Sub Form. Clic

    [单选题]阅读程序: Option Base 1 Private Sub Form. Click() Dim arr,Sum Sum= 0 arr=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为A.13B.14C.27D.15

  • 查看答案
  • 阅读程序;Option Base 1Private Sub Form_ KeyP

    [主观题]阅读程序;Option Base 1Private Sub Form_ KeyPress (KeyAscii As Integer)art = Array(268, 542, 693, 365, 489, 147, 852)a1 = arr(1)a2 = 1If KeyAscii = 13 ThenF.or a = 2 To 6If arr(i) > a1 Thena1 = arr(i)a2 = iE.nd IfNext iE.nd IfPrint a1; a2E.nd Sub程序运行后,按回车

  • 查看答案
  • 有如下程序:Option Base 1Private Sub Form_Clic

    [单选题]有如下程序: Option Base 1 Private Sub Form_Click() Dim arr,Sum Sum=0 alt=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)13 Then Sum=Sum+alt(I) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A.25B.26C.27D.28

  • 查看答案
  • 有如下程序:Option Base 1Private Sub Form_Clic

    [单选题]有如下程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 arr=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arE(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A.25B.26C.27D.28

  • 查看答案
  • 阅读程序:Option Base 1Private Sub Form_Click

    [单选题]阅读程序: Option Base 1 Private Sub Form_Click() Dim arr, Sum Sum=0 art=Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+arr(i) End If Next i Print Sum End Sub 程序运行后,单击窗体,输出结果为______。A.13B.14C.27D.15

  • 查看答案
  • 阅读程序:Option Base 1Private Sub Form_Click

    [单选题]阅读程序: Option Base 1 Private Sub Form_Click() Dim art,Sum Sum=0 art=Array(1,3,5,7,9,11,13,15,17,19) For i=1 To 10 If arr(i)/3=arr(i)/3 Then Sum=Sum+art(i) End If Next i Pdnt Sum End Sub 程序运行后,单击窗体,输出结果为( )。A.13B.14C.27D.15

  • 查看答案
  • 运行下列程序:Option Base 1Private Sub Form_Cli