[单选题]

阅读程序

Option Base 1

Private Sub Form_Click()

D.im arr,Sum

Sum = 0

arr = Array(1,3,5,7,9,11,13,15,17,19)

F.or i=1 To 10

If arr(i)/3 = arr(i)/3 Then

Sum = Sum + arr(i)

E.nd If

Next i

Print Sum

E.nd Sub

程序运行后,单击窗体,输出结果为( )。

A.13

B.14

C.27

D.15

参考答案与解析:

相关试题

阅读程序: OptionBase1PrivateSubForm_Click()

[主观题]阅读程序:Option Base 1Private Sub Form_Click()D.im a(3)As IntegerPrint "输入的数据是:";F.or i = 1 To 3a(i)=InputBox("输入数据")Print a(i);NextPrintIf a(1)t = a(1)a(1)= a(2)a(2)= ________E.nd IfIf a(2)>a(3)Thenm = a(2)E.lseIf a(1)>a(3)Thenm = ________E.ls

  • 查看答案
  • 有如下程序: OptionBase1PrivateSubForm_Click()

    [单选题]有如下程序:Option Base 1Private Sub Form_Click()D.im arr, SumSum = 0arr = Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19)F.or i = 1 To 10If arr(i) / 3 = arr(i) / 3 ThenSum = Sum + arr(i)E.nd IfNext iPrint SumE.nd Sub程序运行后,单击窗体,输出结果为( )。A.25B.26C.27D.28

  • 查看答案
  • 阅读程序:Private Sub Commandl一Click()Dim arr

    [单选题]阅读程序:Private Sub Commandl一Click()D.im arrD.im i AS Integerarr=Array(0,1, 2,3,4,5,6,7,8,9,10)F.or i=0 To 2Print arr(7-i);NextE.nd Sub程序运行后,窗体上显示的是:A.8 7 6B.7 6 5C.6 5 4D.5 4 3

  • 查看答案
  • (28)阅读程序:Private Sub Commandl_Click()Dim

    [单选题](28)阅读程序:Private Sub Commandl_Click()D.im arrD.im i As Integerarr=Array(0,1,2, 3,4, 5,6,7,8,9, 10)F.or i=0To2Print arr(7-i);NextE.nd Sub程序运行后,窗体上显示的是:A.)8 7 6B.)7 65C.)6 5 4D.)5 4 3

  • 查看答案
  • 阅读程序: OptionBase1Dimarr()AsIntegerPrivat

    [单选题]阅读程序:Option Base 1D.im arr() As IntegerPrivate Sub Form_Click()D.im i As Integer, j As IntegerReDim arr(3, 2)F.or i = 1 To 3F.or j = 1 To 2arr(i, j) = i * 2 + jNext jNext iReDim Preserve arr(3, 4)F.or j = 3 To 4arr(3, j) = j + 9Next jPrint arr(3, 2)

  • 查看答案
  • 阅读程序: Option Base 1 Dim arr()As Integer

    [单选题]阅读程序:Option Base 1D.im arr()As IntegerPrivate Sub Form_Click()D.im i As Integer, j As IntegerReDim arr(3,2)F.or i = 1 To 3F.or j = 1 To 2arr(i,j)=i*2+jNextNextReDim Preserve arr(3,4)F.or j=3 To 4arr(3,j)=j+9NextPrint arr(3,2)+arr(3,4)E.nd Sub程序运行后,单击

  • 查看答案
  • 阅读程序:Option Base 1Dim arr()As IntegerPri

    [单选题]阅读程序: Option Base 1 Dim arr()As Integer Private Sub Form_Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next j Print arr(3,2)+arr(3,4) End

  • 查看答案
  • 阅读程序:Option Base 1Dim arr() As IntegerPr

    [单选题]阅读程序:Option Base 1D.im arr() As IntegerPrivate Sub Form_Click()D.im i As Integer,j As IntegerReDim arr(3,2)F.or i=1 To 3F.or j=1 To 2an(i,j) =i*2+jNextNextReDim Preserve an(3,4)F.or j=3 To 4an(3,j) =j+9NextPrint arr(3,2) +air(3,4)E.nd Sub程序运行后,单击窗体,输

  • 查看答案
  • 阅读程序:Option Base 1Dim art()As IntegerPri

    [单选题]阅读程序: Option Base 1 Dim art()As Integer Private Sub Form_Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next Next ReDim Preserve ale(3,4) For j=3 To 4 arr(3,j)=j+9 Next Print arr(3,2)+arr(3,4) End Sub 程序

  • 查看答案
  • 阅读程序:Option Base 1Dim arr() As IntegerPr

    [单选题]阅读程序: Option Base 1 Dim arr() As Integer Private Sub Form. Click() Dim i As Integer,i As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为A.21B.13C.8D.25

  • 查看答案