以下程序的输出结果为______。 Dim a%() = {345, -54, 200, 356, 65, 23} Dim i As Integer, m As Integer, intIndex As Integer m = a(intIndex) For i = a.GetLowerBound(0) To a.GetUpperBound(0) If a(i) > m Then m = a(i) intIndex = i End If Next MsgBox(m & " " & intIndex)? 345 ; ;1|-24 ; ;2|356 ; ;4|356 ; ;3
举一反三
- 执行下面程序段后,输出的结果为( )。 Dim m(5) As Integer s = 0 For i = 0 To 5 m(i) = 5 Next i For j = 0 To 5 s = s + m(j) Next j Print s
- 有如下程序: 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)) 运行后,输出结果为( )。
- 下列程序段的运行结果为( )。Dim m(10)For i = 0 To 9 m(i) = 2 * iNext iPrint m(m(3)) A: 12 B: 6 C: 0 D: 4
- 下列程序段的运行结果为( )。 Dim m(10) For i = 0 To 9 m(i) = 2 * i Next i Print m(m(3)) A: 12 B: 6 C: 0 D: 4
- 程序段如下,程序运行后消息框显示的结果是______。 Dim a, s As String, i As Integer a = "晴空万里" s = "" For i = 1 To 4 Step 2 s &= Mid(a, 4 - i, 2) Next MsgBox(s)? 万里|晴空|万里晴空|晴空万里