• 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
  • 91

    内容

    • 0

      要将字符串数组a中所有学生姓名按数组下标顺序追加到列表框List1中,可以使用的程序段为( )。 A: List1.AddItem a B: For i = 0 To UBound(a) - 1 List1.AddItem a(i), 0 Next i C: For i = 0 To UBound(a) – 1List1.List(i)=a(i)Next i D: For i = 0 To UBound(a) - 1 List1.AddItem a(i) Next i

    • 1

      若有数组Dim a%(10)且每个元素有值,统计前一个元素大于后一个元素的次数,结果存放在变量n中。则下列语句正确的是___________。 A: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = n + 1 End If Next MsgBox(n) B: Dim i%, n% For i = 1 To 10 If a(i) > a(i + 1) Then n = a(i) End If Next MsgBox(n) C: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then a(i) = n + 1 End If Next MsgBox(n) D: Dim i%, n% For i = 0 To 9 If a(i) > a(i + 1) Then n = n +1 End If Next MsgBox(n)

    • 2

      以下程序输出的结果是: 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

    • 3

      设有数组定义:int a[ ] = { 11 , 22 , 33 , 44 , 55 , 66 , 77 , 88 , 99 }; 则执行以下几个语句后的输出结果是 ______ 、 ______ 、 ______ 。 for ( int i = 0 ; i < a.length ; i ++ ) if ( a[i]%3==0 ) System.out.println(a[i]);[/i][/i]

    • 4

      智慧职教: 设有数据定义语句int i=3,x[4]={1,2,3};,则数组元素x[i]的值是。[/i]