• 2022-05-31 问题

    下列程序执行后,sum的结果是________。Dim sum As IntegerFor i = 1 To 4 Step 2 For j = 1 To i Step 2 sum += j NextNext A: 6 B: 9 C: 5 D: 7

    下列程序执行后,sum的结果是________。Dim sum As IntegerFor i = 1 To 4 Step 2 For j = 1 To i Step 2 sum += j NextNext A: 6 B: 9 C: 5 D: 7

  • 2021-04-14 问题

    执行以下程序段后,文本框中显示的内容是________。Dim B(2, 3), i, j As IntegerFor i = 0 To UBound(B, 1)For j = 0 To UBound(B, 2)TextBox1.Text &= B(i, j) & vbTabNextTextBox1.Text &= vbCrLfNext

    执行以下程序段后,文本框中显示的内容是________。Dim B(2, 3), i, j As IntegerFor i = 0 To UBound(B, 1)For j = 0 To UBound(B, 2)TextBox1.Text &= B(i, j) & vbTabNextTextBox1.Text &= vbCrLfNext

  • 2022-06-19 问题

    使用下列命令定义了数组x后,所有数组元素具有相同的 ( )Dim x(99) As IntegerFor i = 0 To UBound(x) x(i) = iNext i A: 存储地址 B: 下标 C: 值 D: 类型

    使用下列命令定义了数组x后,所有数组元素具有相同的 ( )Dim x(99) As IntegerFor i = 0 To UBound(x) x(i) = iNext i A: 存储地址 B: 下标 C: 值 D: 类型

  • 2021-04-14 问题

    执行以下程序段后,数组b中的元素个数有________个。Dim a() As Integer = {2, 15, 9, 4, 5, 56, 74, 8, 43, 10}Dim b(9) As IntegerDim count As Integer = 0Dim i As IntegerFor i = 0 To UBound(a)If a(i) Mod 2 = 0 Thenb(count) = a(i)count += 1End IfNextReDim Preserve b(count - 1)

    执行以下程序段后,数组b中的元素个数有________个。Dim a() As Integer = {2, 15, 9, 4, 5, 56, 74, 8, 43, 10}Dim b(9) As IntegerDim count As Integer = 0Dim i As IntegerFor i = 0 To UBound(a)If a(i) Mod 2 = 0 Thenb(count) = a(i)count += 1End IfNextReDim Preserve b(count - 1)

  • 2022-06-06 问题

    设有命令按钮 Command1 的单击事件过程,代码如下:Private Sub Command1_Click() Dim a(3,3) As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext j Next iSum=0For i=1 To 3Sum=Sum+a(i,4-i) Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是______。 A: 20 B: 7 C: 16 D: 17

    设有命令按钮 Command1 的单击事件过程,代码如下:Private Sub Command1_Click() Dim a(3,3) As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext j Next iSum=0For i=1 To 3Sum=Sum+a(i,4-i) Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是______。 A: 20 B: 7 C: 16 D: 17

  • 1