更多"有如下程序,该程序的执行结果是 【6】 。 Private Sub "的相关试题:
[填空题]有如下程序,该程序的执行结果是 【6】 。
Private Sub Command1 Click( )
For i=1 To 4
x=4
For j=1 To i
x =3
For k=1 To 2
x= x + 5
Next k
Next j
Next i
Print x
End Sub
[单项选择]单击一次命令结束后,下列程序的执行结果是
Private Sub Commandl_Click( )
s=Sat(1)+Sat(2)+Sat(3)+Sat(4)
Print s
End Sub
Public Function Sat(N As Integer)
Static Sum
For i=1 To N
Sum=Sum+i
Next i
Sat=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击命令按钮,下列程序的执行结果是 Private Sub Blck (x As Integer) x = x * 2 + l If x <6 Then Call Blck(x) End If x = x * 2 + 1 Print x; End Sub Private Sub Commandl_Click( ) Blck 2 End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击命令按钮时,下列程序的执行结果是
Private Sub Commandl_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 Function
A. 20
B. 22
C. 28
D. 30
[单项选择]单击命令按钮时,下列程序的执行结果是
Private Sub Book( x As Integer)
x=x*2+1
If x<6 Then
Call Book(x)
End If
x=x * 2 + 1
Print x;
End Sub
Private Sub Command2_Click( )
Book 2
End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击一次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click( )
s=P(1) + P(2) + P(3) + P(4)
Print s
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum + i
Next i
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击—次命令按钮后,下列程序的执行结果是
Private Sub Command1_Click( )
S=P(1)+P(2)+P(3)+P(4)
Print S
End Sub
Public Function P(N As Integer)
Static Sum
For i=1 To N
Sum=Sum+i
Next i
P=Sum
End Function
A. 15
B. 25
C. 35
D. 45
[单项选择]单击命令按钮时,下列程序的执行结果是 Private Sub Book(x As Integer) x=x * 2 + l If x<6 Then Call Book(x) End If X=X * 2 + 1 Print x; End Sub Private Sub Command2_Click( ) Book2 End Sub
A. 23 47
B. 10 36
C. 22 44
D. 24 50
[单项选择]单击命令按钮时,下列程序的执行结果是
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
[单项选择]下面程序执行时,输出的结果是( )。
Private Sub Form_Click( )
DimiASInteger,j As Integer
i=10
Do
i=i+j
forj=10 toistep-3
i=i+j
nextj
Loop Whilei<50
Printi;j
End Sub
A. 50 10
B. 50 9
C. 57 10
D. 59 9