T1值规定为:()
第1题:
(12)有下列Sub过程: Sub Sub(x As Single,y As Single) t=x x=t/y y=t Mody End Sub 在窗体上的命令按钮Commandl中,编写下列事件过程,执行该事件过程调用Sun过程,结果是( )。 Private Sub Commandl_Click() Dim a As Single Dim b As Single a=5 b=4 Sun a,b Print a;b End Sub A.1.25 1 B.5 4 C.4 5 D.1 1.25
第2题:
窗体Form1上有一个名称为Command1的命令按钮,以下对应窗体单击事件的事件过程是( )。
A.Private Sub Form1 Click( )
End Sub···
B.Private Sub Form1. Click( )
End Sub···
C.Private Sub Command1 click( )
End Sub···
D.Private Sub Command Click( )
End Sub···
第3题:
执行下面的程序段,x的值为【 】。
Private Sub Command1_Click()
For i=1 To 9
a=a+i
Next
x=Val(i)
MsgBox x
End Sub
第4题:
有如下程序: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5:b=4 Call Sub1(a,b) End Sub Sub Sub1(x As Single,y As Single) t=X X=t\Y Y=t Mod y End Sub 在调用运行上述程序后,a和b的值分别为
A.0 0
B. 1 1
C.2 2
D.1 2
第5题:
有如下事件过程:
Private Sub Form. Active ( )
Dim Score (1 to 3) As Integer
Dim i As Integer
Dim t As Variant
Fori=3 To 1 step-1
Score (i) = 2 * i
Next
For Each t In Score
Print t
Next
End Sub
程序运行后窗体上显示的值为【 】。
第6题:
(27)有下列两个过程: Sub S1(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Sub S2(x As Integer,y As Integer) Dim t As Integer t=x x=y y=t End Sub 则下列叙述中正确的是 A.用过程S1可以实现交换两个变量的值的操作,S2不能实现B.用过程S2可以实现交换两个变量的值的操作,S1不能实现 C.用过程S1和S2可以实现交换两个变量的值的操作 D.用过程S1和S2不能实现交换两个变量的值的操作
第7题:
以下程序用于求S=1+3+32+33+…+310的值。
Private Sub Commandl_Click()
S=1
T=1
ForI=1 To 10
T=______
S=S+T
NextI
Print"S=";S
End Sub
第8题:
假定有如下的Sub过程:
Sub sfun(x As Single,y As Single)
t=x
x=t/y
y=t Mod y
End Sub
在窗体上添加一个命令按钮(名为Command1),然后编写如下事件过程:
Private Sub Command1_Click()
Dim a as single
Dim b as single
a=5
b=4
sfun a,b
MsgBox a & chr(10)+chr(13)& b
End Sub
打开窗体运行后,单击命令按钮,消息框的两行输出内容分别为
A.1和1
B.1.25和1
C.1.25和4
D.5和4
第9题:
编写如下事件过程: Private Sub Form_Activate() Dimscore(1 to 3)As Integer Dimi As Integer Dim t As Variant Fori= 3 To 1 Step-1 score(i)=2*i Nexti ForEach t Inscore Printt Next End Sub 程序运行后窗体上显示的值是( )。
A.642
B.246
C.2
D.6
第10题:
有如下程序: Private Sub Commandl_Click() Dim a As Single Dim b As Single a=2:b=4 Call CS(a,b)End Sub Sub CS(x As Single,y As Single) t=X x=t\y y=t Mod y End Sub 程序运行后,单击命令按钮,a和b的值分别为
A.0 0
B.1 1
C.0 2
D.1 2