题目内容

若执行以下程序段时依次输入3,4,5,则执行结果为________。Dim a(4) As Integer, b(4) As IntegerFor k = 0 To 2a(k + 1) =Val(InputBox("请输入数据:"))b(3 - k) = a(k+ 1)Next kPrint b(k)

查看答案
更多问题

下列程序段的执行结果为________。Dim M(10), N(10)i= 4For j = 1 To 7M(j) = jN(i) = 2 * i + jNext jPrint N(i); M(i)

下列程序段的执行结果为________。Dim a(10) As Integer, b() As IntegerDim i As IntegerReDim b(5)For i = 1 To 10a(i) =i*iIf i Mod 2 = 0 Thenb(i/2) = a(i)End IfNext iPrint a(4); b(3)

运行以下程序,单击命令按钮后在窗体上输出内容_________。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

运行以下程序,单击命令按钮后,如果用户从键盘上输入1、2、3、4、5、6,则窗体上输出内容为_________。Private Sub Command1_Click()Dim a() As IntegerDim i As Integer, j As IntegerReDim a(6)For i = 5 To 10a(10- i + 1) = InputBox("input number")Next iReDim Preserve a(10)a(10) = a(3) + a(5)Print a(10)End Sub

答案查题题库