更多"执行下列程序,输入数字3,则输出结果为______。 Private"的相关试题:
[填空题]执行下列程序,输入数字3,则输出结果为 (8) 。
Private Sub Command1_Click( )
a=InputBox("Input a Number")
If a>5 Then
GoTo L5
Else If a>2 Then
GoTo L2
Else
GoTo L3
End If
Exit Sub
L5:
Print a Mod5
Exit Sub
L3:
Print a Mod 3
Exit Sub
L2:
Print a Mod 2
End Sub
[填空题]执行下列程序,输入数字3,则输出结果为______。
Private Sub Command1_Click( )
a=inputBox("Input a Number")
If a>5 Then
GoTo L5
Else If a>2 Then
GoTo L2
Else
GoTo L3
End If
Exit Sub
L5:
Print a Mod 5
Exit Sub
L3:
Print a Mod 3
Exit Sub
L2:
Print a Mod 2
End Sub
[单项选择]单出命令按钮执行以下程序,输出结果为( )。
Private Sub Command1_Click( )
Dim x As Integer,y As Integer
x=12:y=32
Call Proc(x,y)
Print x;y
End Sub
Public Sub Proc(n As Integer,ByVal m As Integer)
n=n Mod 10
m=m Mod 10
End Sub
A. 12 32
B. 2 32
C. 2 3
D. 12 3
[单项选择]单击命令按钮执行下列程序,其输出结果是( )。
Private Sub Command1_Click( )
Dim a As Integer,b As Integer,c As Integer
a=3
b=4
c=5
Prim 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 Command1_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 Command1_Click( )
Dim x As Integer,y As Integer
X=14:y=48
Call Proc(x,y)
Print x;y
End Sub
Public Sub Proc(n As Integer,ByVal m As Integer)
n=n Mod 10:m=m Mod 10
End Sub
A. 4 8
B. 14 8
C. 14 48
D. 4 48
[填空题]执行下面的程序,当输入3时,输出的结果是 【11】
Private sub Command1_Click( )
i=2
j= InputBox(" j = ")
On j GoTo 20,30,40,50
i=i+2
20:i=i+2
30:i=i+2
40:i=i+2
50:i=i+2
Print i
End Sub
[填空题]执行如下程序段后,输出结果为 (7) 。
Private Sub Command1_Click( )
sum=0
For i=1 To 18 Step 2
For j=2 T0 6
If (Mod j)<>0 Then sum=sum+j
Next
Next
Print sum.
End Sub
[单项选择]执行下列程序后,在文本框中输入字符“d”,输出结果为______。
Private Sub Form_Load( )
Text1=""
End Sub
Private Sub Text1_Change( )
Print Text1.Text
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Print Chr(KeyCode)
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Print Chr(KeyAscii)
End Sub
A. D
B. d
C. d
D. D
[单项选择]执行下列程序,在文本框中输入字符“a”,则输出结果为______。
Private Sub Form_Load( )
Text1.Text=""
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
Text1.Text=KeyCode
Print Text1.Text
End Sub
A. a
B. 65
C. A
D. 97
[单项选择]执行下面的程序,输出的结果是 ______ 。
Private Sub Command1_Click( )
ch $ = "Welcome to China!"
n = Len(ch $ )
For i =1 To n-1
s$ =Mid(ch$ ,i,1)
If s$ ="o" Then m=m + 1
Next i
Print m
End Sub
A. 1
B. 2
C. 8
D. 0
[单项选择]执行下列程序后,鼠标单击窗体,输出结果为
Private Sub Form_Click( )
Print"Click":
End Sub
Private Sub Form_MouseDown(Button As Integer,Shift_As Integer,X As Single,Y As Single)
Print"Donw"
End Sub
Private Sub Form_MouseUp(Button As Integer,Shift_As Integer,X As Single,Y As Single)
Print"Up"
End Sub
A. DownUpClick
B. CfickDownUp
C. DownClickUp
D. UpDownClick