下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim J As Integer J=5 Do J=J*2
A.3
B.10
C.9
D.7
第1题:
阅读程序: 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 arr(i,j)=i*2+j Next j Next i ReDim Preserve arr(3,4) For j=3 To 4 arr(3,j)=j+9 Next j Print arr(3,2)+arr(3,4) End Sub 程序运行后,单击窗体,输入结果为______。
A. 21
B.13
C.8
D.25
第2题:
面程序的功能是找出能够被13、23、43除余数分别为1、2、3的最小的两位正整数。
请填空。
Private Sub Form_Click()
Dim i As Integer,j As Integer
j=0
j=43+3
Do
j=j+1
if ______ then
print j
i=i+1
end if
Loop ________
End Sub
第3题:
有如下程序,运行后输出的是( )。 Option Base 1 Private Sub Commandl_click() Dim aj(1 To 10) Forj=6 To 10 aj(j)=j*2 Nextj Printaj(1)+aj(j) End Sub
A.5
B.20
C.22
D.显示出错信息
第4题:
下列程序的运行结果为【 】。
A="1"
B="2"
A=Val (@A@+Val (@B@B=Val ("12")
If A<>B Then Prink A-B Else Print B-A
(11)阅读下列程序:
Option Base 1
Private Sub Form. Click()
Dim x(3,3)
For j=1 to 3
For k=1 to 3
If j=k then x(j,k)=1
If j<> k then x(j,k)=3
Next k
Next j
Call fun(x())
End Sub
Private Sub fun(a())
For j=l to 3
For k=1 to 3
Print a (j.k);
Next k
Next j
End Sub
运行程序时,输出的结果是【 】
第5题:
在窗体上画一个名称为Text1 的文本框和一个名称为Command1 的命令按钮,然后编写如下事件过程: Private Sub Commandl1_Click( ) Dim array1 ( 10, 10) As Integer Dim i,j As Integer For i=1 To 3 For j = 2 To 4 Array1 (i, j) =i +j Next j Next i Text1.Text=array1(2.3) + array1(3.4) End Sub程序运行后,单击命令按钮,在文本框中为示的值是( )。
A.12
B.13
C.14
D.15
第6题:
在窗体上绘制一个名称为Label1的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j =2 To 4 arr(i,j)=i*j Next j Next i Label1.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是( )。
A.12
B.13
C.14
D.15
第7题:
下面过程运行之后,则变量J的值为( )。 Private Sub Fun() Dim f AS Integer J-5 Do J=J*2
A.3
B.10
C.9
D.7
第8题:
在窗体上画一个名称为Labell的标签,然后编写如下事件过程: Private Sub Form_Click() Dim arr(10,10)As Integer Dim i As Integer,j As Integer For i =2 To 4 For j=2 To 4 arr(i,j)=i*j Next j Next i Labell.Caption=Str(arr(2,2)+arr(3,3)) End Sub 程序运行后,单击窗体,在标签中显示的内容是
A. 12
B.13
C.14
D.15
第9题:
阅读下列程序。
Option Base 1
Private Sub Form. Click()
Dim x(3,3)
For j=l to 3
For k=l to 3
If j=k then x(j,k)=l
If j<>k then x(j,k)=k
Next k
Next j
Call fun(x())
End Sub
Private Sub fun(x() )
For j=1 to 3
For k=1 to 3
Print x(j,k);
Next k
Next j
End Sub
运行程序时,输出结果为【 】
第10题:
在窗体上画一个名称为Text1的文本框和一个名称为Commsnd1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim arrayl(10, 10) As Integer Dim i, j as Integer For i = 1 To 3 For j = 2 To 4 arrayl(i, j) = i+j Next j Next i Text11.. Text=array1(2, 3) + array1(3, 4) End Sub程序运行后,单击命令按钮,在文本框中显示的值是( )。
A.12
B.13
C.14
D.15