更多"在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: "的相关试题:
[单项选择]在窗体上画一个命令按钮(名称为Command1),并编写下列代码:
Function Fun1(ByVa1 a As Integer,b As Integer)As Integer
Dim t As Integer
t=a-b
b=t+a
Fun1=t+b
End Function
Private Sub Command1Click( )
Dim X As Integer
x=10
Print Fun1(Vun1(X,(Fun1(x,x-1))),x-1)
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. 10
B. 0
C. 11
D. 21
[单项选择]在窗体上画一个命令按钮(名称为Command1),并编写如下代码:
Function Fun1 (ByVal a As Integer, b As Integer) As Integer
Dim t As Integer
t=a-b
b=t+a
Fun1=t+b
End Function
Private Sub Command1_Click( )
Dim x As Integer
x=10
Print Fun1 (Fun1 (x, (Fun1 (x, x-1))), x-1)
End Sub
程序运行后,单击命令按钮,输出结果是( )。
A. 10
B. 0
C. 11
D. 21
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序: Function Func(ByVal x As Integer,y As Integer) y=x*y If y>0 Then Func=x Else Func=y End If End Function Private Sub Command1_Click( ) Dim a As Integer,b As Integer a=3 b=4 c=Func(a,B) Print "a="; a Print "b="; b Print "c="; c End Sub 程序运行后,单击命令按钮,其输出结果为______。
A. a=3 b=12 c=3
B. a=3 b=4 c=3
C. a=3 b=4 c=12
D. a=13 b=12 c=12
[单项选择]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:
Function Func(ByVal x As Integer, y As Integer)
y=x*y
If y >0 Then
Func = x
Else
Func = y
End If
End Function
Private Sub Command1_ Click( )
Dim a As Integer, b As Integer
a=3
b=4
c = Func(a, B )
Print "a="; a
Print "b="; b
Print "c="; c
End Sub
程序运行后,单击命令按钮,其输出结果为______。
A. a=3 b=12 c=3
B. a=3 b=4 c=3
C. a=3 b=4 c=12
D. a=13 b=12 c=12
[填空题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:
Function M(x As Integer,y As Integer) As Integer
M=IIf(x>y,x,y)
End Function
Private Sub Command1 Click( )
Dim a As Integer, b As Integer
a=100
b=200
Print M(a,b)
End Sub
程序运行后,单击命令按钮,输出结果为 ______。
[填空题]在窗体上画一个命令按钮,其名称为Command1,然后编写如下程序:
Function M(x As Integer,y As Integer)
M=IIf(x>y,x,y)
End Function
Private Sub Command1_Click( )
Dim a As Integer, b As Integer
a=100
b=200
Print M(a,B)
End Sub
程序运行后,单击命令按钮,输出结果为 【15】 。