更多"在窗体上有一个命令按钮,然后编写如下事件过程。 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 In 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 Command1_Click( ) Dim a a=Array(1,2,3,4,5) For k=1 To 4 s=s+a(k) Next Print S End Sub 运行程序后,单击命令按钮,输出结果是
A. 10
B. 14
C. 15
D. 120
[单项选择]在窗体上画一个命令按钮,然后编写如下程序
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