第1题:
在窗体上画1个命令按钮,其名称为Command1,然后编写如下程序: Private Sub Command1 Click() Dim a(10) As Integer Dim x As Integer For i=1 To 10 a(i)=8+i Next x=2 Print a(f(x)+x) End Sub Function f(x As Integer) x=x+3 f=x End Function 程序运行后,单击命令按钮,输出结果为______。
A.12
B.15
C.17
D.18
第2题:
执行以下程序段
Dim i As Integer, x As Integer
x = 0
For i = 20 To 1 Step -2
x = x + i \ 5
Next
Print x
后,x的值为( )。
A.16
B.17
C.18
D.19
第3题:
单击命令按钮执行下列程序,其输出结果是。 Private Sub Commana1_Click() Dim a As Integer,b As Integer,c As Integer a = 3 b = 4 c = 5 Print SecProc(c,b,a) End Sub Function FirProc(x As Integer,y As Integer,z As Integer) FirProc = 2 * x + y + 3 * z End Function Function SecProc(x As Integer,y As Integer,z As Integer) SecProc = FirProc(z,x,y) + x End FunctionA. 20 B. 22 C. 28 D. 30
第4题:
单击命令按钮时,下列程序的执行结果是
Private Sub Command1_Click()
Dima As Integer,b As Integer,c As Integer
a=3:b=4:c=5
Print SecProc(c,b,A)End Sub
Function FirProc(x As Integer,y As Integer,z As Integer)
FirProc=2*x+y+3*z+2
End Function
Function SecProc(x As Integer,y As Integer,z As Integer)
SecProc=FirProc(z,x,y) +x+7
End Function
A.20
B.25
C.37
D.32
第5题:
单击命令按钮时,下列程序代码的执行结果为( )。 Private Function FirProc(x As Integer,y As Integer,z As Integer) FirProc=2*x+y+3*z End Funcfion Private Function SecProc(x As Integer,y As Integer,z As Integer) SecProc=FirProc(z,x,y)+x End Funcfion Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer a=2 b=3 c=4 Printf SecProc(c,b,a) End Sub
A.21
B.19
C.17
D.34
第6题:
执行以下程序段 Dim i As Integer,X As Integer x=0 For i=20 To 1 Step -2 x=x+i\5 Next Print x 后,x的值为______。
A. 16
B.17
C.18
D.19
第7题:
下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()
A.23
B.19
C.21
D.22
第8题:
单击命令按钮时,下列程序的执行结果为
Private Sub Command1_Click()
Dim a As Integer, b As Integer, c As Integer
a=2: b=3: c=4
Print P2(c, b, A.
End Sub
Private Function P1(x As Integer, y As Integer, z As Integer)
P1=2 * x + y + 3 * z
End Function
Private Function P2(x As Integer, y As Integer, z As Integer)
P2=P1(z, x, y) + x
End Function ( )。
A.21
B.19
C.17
D.34
第9题:
执行以下程序段后,x的值为( )。 Dim x As Integer,i As Integer x=0 For i=20 To 0 Step -2 x=x+i\5 Next i
A.16
B.17
C.18
D.19
第10题:
单击命令按钮时,下列程序的执行结果为 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer a=2:b=3:C=4 Print P2(c,b,A)End Sub Private Function P1(x As Integer,y As Integer,z As Integer) P1=2 * X + y + 3 * z End Function Private Function P2(x As Integer,y As Integer,z As Integer) P2=P1(z,x,y) + X End Function
A.21
B.19
C.17
D.34