• 2021-04-14 问题

    下列程序的执行结果为_____。Dim intsum As IntegerDim I As Integerintsum=0For I=20.2 To 5 Step -4.7intsum=intsum +INext IPrint intsum

    下列程序的执行结果为_____。Dim intsum As IntegerDim I As Integerintsum=0For I=20.2 To 5 Step -4.7intsum=intsum +INext IPrint intsum

  • 2021-04-14 问题

    执行以下语句,则数组a的元素中不可能出现的元素值是________。Dim a(99) As IntegerDim i As IntegerRandomize()For i = 0 To UBound(a)a(i) = Int(Rnd() * 26 + 65)Next i

    执行以下语句,则数组a的元素中不可能出现的元素值是________。Dim a(99) As IntegerDim i As IntegerRandomize()For i = 0 To UBound(a)a(i) = Int(Rnd() * 26 + 65)Next i

  • 2021-04-14 问题

    运行以下程序,单击命令按钮后在窗体上输出内容_________。Private Sub Command1_Click()Dim a() As IntegerDim i As Integer, j As IntegerReDim a(3, 4)For i = 1 To 3For j = 1 To 4a(i, j) = i* 10 + jNext jNext iReDim a(4, 5)Print a(2, 3)End Sub

    运行以下程序,单击命令按钮后在窗体上输出内容_________。Private Sub Command1_Click()Dim a() As IntegerDim i As Integer, j As IntegerReDim a(3, 4)For i = 1 To 3For j = 1 To 4a(i, j) = i* 10 + jNext jNext iReDim a(4, 5)Print a(2, 3)End Sub

  • 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-07 问题

    窗体上有一个名称为Command1的命令按钮,其中部分代码如下:Private Sub Command1_Click()Dim a(10)As IntegerDim n As Integer……Call calc(a,n)……End Subcalc过程的首行应该是()。 A: Sub calc(x() As Integer, n As Integer) B: Public Sub calc(x() As Integer) C: Private Sub calc(a(n) As Integer, n As Integer) D: Public Sub calc(a As Integer, n As Integer)

    窗体上有一个名称为Command1的命令按钮,其中部分代码如下:Private Sub Command1_Click()Dim a(10)As IntegerDim n As Integer……Call calc(a,n)……End Subcalc过程的首行应该是()。 A: Sub calc(x() As Integer, n As Integer) B: Public Sub calc(x() As Integer) C: Private Sub calc(a(n) As Integer, n As Integer) D: Public Sub calc(a As Integer, n As Integer)

  • 2022-06-12 问题

    以下有关数组定义的语句序列中,错误的是______。 A: Static arr1(3)arr1(1)=100arr1(2)="Hello"arr1(3)=123.45 B: Dim arr2() As IntegerDim size As IntegerPrivate Sub Command2_Click()size=InputBox("输入:")ReDim arr2(size)……End Sub C: Option Base 1Private Sub Command3_Click()Dim arr3(3) As Integer…… End Sub D: Dim n As IntegerPrivate Sub Command4_Click()Dim arr4(n) As Integer……End Sub

    以下有关数组定义的语句序列中,错误的是______。 A: Static arr1(3)arr1(1)=100arr1(2)="Hello"arr1(3)=123.45 B: Dim arr2() As IntegerDim size As IntegerPrivate Sub Command2_Click()size=InputBox("输入:")ReDim arr2(size)……End Sub C: Option Base 1Private Sub Command3_Click()Dim arr3(3) As Integer…… End Sub D: Dim n As IntegerPrivate Sub Command4_Click()Dim arr4(n) As Integer……End Sub

  • 1