更多"在窗体上有一个命令按钮,然后编写如下事件过程: Private Su"的相关试题:
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程 Private Sub Command1 _ cickc ( ) a=InputBox("enter the first integer") b=InputBox("enter the second integer") Print b + a End Sub 程序运行后,单击命令按钮,先后在两个输入框中分别输入“2”和“6”,则输出结果为
A. 2
B. 62
C. 8
D. 26
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程
Private Sub Command1 _ cickc ( )
a=InputBox("enter the first integer")
b=InputBox("enter the second integer")
Print b + a
End Sub
程序运行后,单击命令按钮,先后在两个输入框中分别输入“2”和“6”,则输出结果为( )。
A. ifstream fin;fin.open("C:////test.txt");
B. ifstream fin("C:////test.txt");
C. A)和B)
D. ifstream fin;fin("C:////test.txt");
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程。 Private Sub Command1_Click( ) Dim a(5)As String FOR i=1 To 5 a(i)=Chr(Asc("A")+(i-1)) Next For Each b h a Print b; Next End Sub 程序运行后,单击命令按钮,输出结果是
A. ABCDE
B. 1 2 3 4 5
C. abcde
D. 出错信息
[单项选择]在窗体上有一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim a(5) As String
FOR i=1 To 5
a(i) =Chr(Asc("A") +(i-1))
Next
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
[单项选择]在窗体上画一个命令按钮,然后编写下列程序:
Private Sub Command1 click( )
Dim a As Single,b As Single
a=6:b=2
RC a,b
Print a,b
End Sub
Sub RC(x As Single,y As Single)
i=x
x=i/y
y=i Mod y
End Sub
程序运行后,输出的结果为( )。
A. 4 3
B. 1 1
C. 3 0
D. 2 6