以下程序输出的结果是: Private Sub Form_Activate() Dim a a=Array(1,2,3,4,5) For i=Lbound(((A) To Ubound(((A) A(i)=i*a(i) Next i Print i, Lbound(((A) , Ubound(((A) , a(i) End Sub
举一反三
- 有如下程序: Const N=-5 Const M=6 Dim a(N To M)As Integer For i=LBound(a)To UBound(a) a(i)= i Next i Print a(LBound(a));a(UBound(a)) 运行后,输出结果为( )。
- 以下程序的运行结果是 Sub s1(b() As Integer) For i = 1 To 4 b(i) = 2 * i Next i End Sub Private Sub Command1_Click() Dim a(1 To 4) As Integer For i = 1 To 4 a(i) = i + 5 Next i s1 a() For i = 1 To 4 Print a(i) Next i End Sub
- 执行以下程序,单击命令按钮后,输出结果是______。 Private Sub Command1_Click() Dim a(5) As Integer Dim b For i = 1 To 5 a(i) = i*i Next i For Each b In a Print b; Next b End Sub
- 下列程序的运行结果为( )。 Private Sub Command1_Click() Dim a(5) As String Dim i As Integer For i = 0 To 5 a(i) = i + 1 Print a(i); Next i End Sub
- 写输出下面程序的运行结果_ _。 Dim a() As Integer Private Sub Command1_Click() ReDim a(1 To 5) For i = 1 To 5 a(i) = i Next i ReDim a(1 To 10) For i = 6 To 10 a(i) = 2 * i Next i For i = 1 To 10 Print a(i); Next i End Sub