阅读程序:
Private Sub Form. Click( )
a=0
For j=1 To 15
a=a+j Mod 3
Next j
Print a
End Sub
程序运行后,单击窗体,输出结果是( )。
A.105
B.1
C.120
D.15
第1题:
阅读程序: Option Base 1 Dim art()As Integer Private Sub Form_Click() Dim i As Integer,j As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next Next ReDim Preserve ale(3,4) For j=3 To 4 arr(3,j)=j+9 Next Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为
A.21
B.13
C.8
D.25
第2题:
下面程序运行后的输出结果是______。Private Sub Command1_ Click ( ) for j = 1 To 10 if j Mod 3 <> 0 then a =a+j\3 Next j Print aEnd Sub
A.20
B.10
C.3
D.9
第3题:
阅读程序: Option Base 1 Dim arr() As Integer Private Sub Form. Click() Dim i As Integer,i As Integer ReDim arr(3,2) For i=1 To 3 For j=1 To 2 arr(i,j)=i*2+j Next j Next i ReDim arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输出结果为
A.21
B.13
C.8
D.25
第4题:
以下程序运行后输出的结果是______。
public class exl7
{
public static void main(String args [])
{
int a = 0;
for(int j = 1; j <= 20; j++)
if(j%5 != 0)
a = a + j;
System.out.println (a);
第5题:
阅读程序:
Option Base 1
Dim arr() As Integer
Private Sub Form_Click()
Dim i As Integer,j As Integer
ReDim arr(3,2)
For i=1 To 3
For j=1 To 2
an(i,j) =i*2+j
Next
Next
ReDim Preserve an(3,4)
For j=3 To 4
an(3,j) =j+9
Next
Print arr(3,2) +air(3,4)
End Sub
程序运行后,单击窗体,输出结果为
A.21
B.13
C.8
D.25
第6题:
下面程序运行后的输出结果是 Private Sub Command1_Click() For j=1 To 10 If j Mod 3<>0 Then a=a+j\3 Next Print a End Sub
A.20
B.10
C.3
D.9