更多"在窗体上有个命令按钮,然后编写如下事件过程:
m=InputB"的相关试题:
[单项选择]在窗体上有个命令按钮,然后编写如下事件过程 m=InputBox("enter the first integer") n=InputBox("enter the second integer") Print n+m 程序运行后,单击命令按钮,先后在两个输入框中分别输入“1”和“5”,则输出结果为
A. 1
B. 51
C. 6
D. 15
[单项选择]在窗体上有个命令按钮,然后编写如下事件过程:
m=InputBox("enter the first integer")
n=InputBox("enter the second integer")
Print n+m
程序运行后,单击命令按钮,先后在两个输入框中分别输入“1”和“5”,则输出结果为( )。
A. 30
B. 31
C. 32
D. 33
[单项选择]在窗体上画一个命令按钮,然后编写如下程序。运行后,单击命令按钮,输出结果为 ( )。
Private Sub Command4_Click( )
Dima As Integer,bASInteger
a=1
b=2
PrintN(a,b)
End Sub
Function N(X As Integer,yAsInteger)AsInteger
N=IIf(x>y,x,y)
End Funcfion
[单项选择]在窗体画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( ) Dim a(5) As String
For i = 1 To 5
a(i) = Chr( Asc("A") + (i -1)) Next i
For Each b In a
Print b; Next
End Sub
程序运行后,单击命令按钮,输出结果是______。
A. ABCDE
B. 1 2 3 4 5
C. abcde
D. 出错信息
[单项选择]在窗体上画一个命令按钮,然后编写如下程序
Private Sub Command4 Click( )
Dim a As Integer,b As Integer
a=1
b=2
Print N(a,b)
End Sub
Function N(x As Integer,y As Integer)As Integer
N=IIf(x>y,x,y)
End Function
程序运行后,单击命令按钮,输出结果为( )。
A. l
B. 2
C. 5
D. 8