网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。
A

定义一个数据处理方法

B

定义一个数据输入方法

C

定义一个事件过程

D

定义一个数据类型


参考答案

参考解析
解析: 暂无解析
更多 “单选题有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。A 定义一个数据处理方法B 定义一个数据输入方法C 定义一个事件过程D 定义一个数据类型” 相关考题
考题 执行下面的程序段,x的值为【 】。Private Sub Command1_Click()For i=1 To 9a=a+iNextx=Val(i)MsgBox xEnd Sub

考题 有一过程如下:Sub Sub1(m As Integer,total As Long)Dim i As Integertotal=1For i=1 To mtotal=total*iNextEnd Sub调用它的事件过程如下:Private Sub Command1_Click()Dim tot As Long,a As Integera=Val(InputBox("请输入数据"))Call Sub1(a,tot)Print totEnd Sub则输入数据5,运行结果为【 】。

考题 在窗体上画一个命令按钮,然后编写如下程序: Sub S1(ByVal x As Integer,ByVal y As Integer) Dim t As Integer t=x x=y y=t End Sub Private Sub Command1_Click() Dim a As Integer,b As Integer a=10 b=30 S1 a,b Print"a=";a;"b=";b End Sub 程序运行后,单击命令按钮,输出结果是 ______。A.a=30 b=10B.a=30 b=30C.a=10 b=30D.a=10 b=10

考题 有如下程序:Private Sub Command1_Click()Dim a As SingleDim b As Singlea=2: b=4Call CS (a, B.End SubSub CS (x As Single, y As Single)t=xx=t \ yy=t Mod yEnd Sub程序运行后,单击命令按钮,a和b的值分别为( )。A.0 0B.1 1C.0 2D.1 2

考题 有如下程序,执行程序后单击Button1按钮,窗体上显示的是什么()Private Sub Command1_Click()Dim a Dim b As Integera = 5 / 2b = 5 / 2Print a, bEnd Sub A、2 2B、 2 2.5C、 2.5 2D、 2.5 2.5

考题 设有如下程序: Private Sub Form. Click( ) Dim s As Long,f As Long Dim n As Integer,i As Integer f=1 n=4 For i=1 To n f=f*i s=s+f Next i Print s End Sub 程序运行后,单击窗体,输出结果是( )。A.32B.33C.34D.35

考题 有如下程序: 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 0B. 1 1C.2 2D.1 2

考题 有如下函致: Function fact(x As Integer)As Long Dim p As Long,i As Integer p=1 For i=1 To x p=p*1 Next fact=p End Function 调用它的事件过程如下: Private Sub Command1_Click() i=Val(Inputbox("请输入数据")) a=fact((i)) Print a End Sub 若输入数据5,则运行结果为A.120B.60C.80D.100

考题 下列正确的Visual Basic注释语句是A.Dim a(10) As Integer Rem这是一个VB程序B.这是一个VB程序 Private Sub Command1_Click()…C.a=1:b=2:_Rem这是一个VB程序:c=3D.If Shift=6 And Button=2 Then Print"BBBB" Rem 这是一个VB程序 End If

考题 在窗体上画一个命令按钮,然后编写如下程序: Sub S1(By Val x As Integer, By Val y As Integer) Dim t As Integer t=x x=y y=r End Sub Private Sub Command1_Click() Dim a As Integer, b As Integer a=10 b=30 S1 a,b Print"a=";"b=";b End Sub 程序运行后,单击命令按钮,.输出结果是______。A.a=30 b=10B.a=30 b=30C.a=10 b=30D.a=10 b=10

考题 有如下一个Sub过程: Sub mlt(ParamArray numbers()) n=1 For Each x In numbers n=n*x Next x Print n End Sub 在一个事件过程中如下调用该Sub过程: Private Sub Command1_Click() Dim a As Integer Dim b As Integer Dim c As Integer Dim d As Integer a=1 b=2 c=3 d=4 mlt a,b,c,d End Sub 该程序的运行结果为( )。A.12B.24C.36D.48

考题 下列程序的输出结果是【 】。Private Sub Command1_Click()Dim a(1 To 20)Dim iFor i=1 To 20a(i)=iNext iFor Each i In a()a(i)=20Next iPrint a(2)End Sub

考题 假定有如下的Sub过程: Sub Func(x As Single, y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=6 b=5 Func(a, B) Print a, b End Sub 程序运行后,单击命令按钮,输出结果为 ______。A.6 5B.1 1C.1.2 5D.1.2 1

考题 假定有如下的Sub过程: Sub S(x As Single,y As Single) t=x x=t/y y=t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim a As Single Dim b As Single a=5 b=2 S a,b print a,b End Sub 程序运行后,单击命令按钮,输出结果是( )。A.5 2B.1 1C.1.25 4D.2.5 1

考题 下面程序段,运行后的结果是 Private Sub Command1_Click() Dim b%(1 To 4),i%,t# For i=1 To 4 b(i) =i Next t=Tof(b() ) Print"t=";t, End Sub Function Tof(a() As Integer) Dim t#,i% t=1 For i=2 To UBound(a) t=t*a(i) Next Tof=t End FunctionA.t=18B.t=24C.t=30D.t=32

考题 有过程如下:Sub fact (m As Integer, total As Long) Dim i As Integer total = 1 for i = 1 To m total = total*i Next iEnd Sub调用它的事件过程如下:Private Sub Command1_ Click () Dim tot As Long Dim a As Integer a = Val InputBox (“请输入数据”)) Call fact (a, tot) Print totEnd Sub则输入数据5,运行结果为 ______。A.100B.120C.200D.50

考题 假定有如下的Sub过程:Sub Sub1(x As Single,y As single)t=xx=t/yy=t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_click()Dim a As SingleDim b As Singlea=5b=4Sub1 a,bPrint a;bEnd Sub程序运行后,单击命令按钮,输出结果为A.B.C.D.

考题 假定有如下的Sub过程:Sub Sub1(x As Single, y As single)t=xx=t / yy=t Mod yEnd Sub在窗体上画一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()Dim a As SingleDim b As Singlea=5b=4Sub1 a,bPrint a;bEnd Sub程序运行后,单击命令按钮,输出结果为A.54B.] 1]]1C.] 1.2]]5.4D.] 1.25]]1

考题 在窗体中添加一个名为Command1的命令按钮,然后编写如下程序:Private Sub s(By Val p As Integer)p=p*2End SubPrirate Sub Command1_Click( )Dim i As Integeri=3Call s(i)If i>4 Then i=i^2MsgBox IEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为______。

考题 下列程序的输出结果是( )。Private Sub Command1_Click()Dim arr(1 To 10)For i=1 To 10Next iFor Each i In arr()Next iEnd Sub

考题 先在 窗体上添加一个命令按纽,然后编写如下程序: Function fun(ByVal nm As Long)As Long Dim k As Long k=1 num=Abs(num) Do While num k=k*(num Mod 10) num=num\10 Loop fun=k End Function Private Sub Command1_Click() Dim n As Long Dim r As Long n=InputBox(“请输入一个数”) n=CLng(n) r=fun(n) Print r End Sub 则在程序运行后,单击命令按纽,在对话框中输入“100”,输出结果是______。A. 0B.100C.200D.300

考题 有如下程序。Private Sub Command1_Click()Dim a As SingleDim b As Singlea=5: b=4Call Sub1(a, b)End SubSub Sub1(x As Single, y As Single)t=xx=t \ yy=t Mod yEnd Sub在调用运行上述程序后,a和b的值分别为A.0 0B.1 1C.2 2D.1 2

考题 在窗体上画一个命令按钮,然后编写如下程序: Function funl(ByVal Bum As Long)As Long Dim k As Long k = 0 Bum=Abs(Bum) Do While Bum k=k+(Bum Mod 10) Bum=Bum\10 Loop fun1=k End Function Private Sub Command1_Click() Dim n As Long n=InputBox("请输入一个数") Print fun1(n) End Sub 程序运行后,单击命令按钮,在对话框中输入234,输出的结果为A.3B.4C.9D.10

考题 编写如下通用过程: Sub Proc(x As Single, y As Single) t = x x = t/y y = t Mod y End Sub 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click () Dim a As Single Dim b As Single a = 5 b = 4 Proc a, b Print a, b End Sub 程序运行后,如果单击命令按钮,则输出结果为A.5 4B.1.25 1C.4 5D.1.25 5

考题 ( 12 )在窗体中添加一个名称为 Command1 的命令按钮,然后编写如下程序:Private Sub s ( By Val p As lnteger )p=p*2End SubPrivate Sub Command1_Click()Dim i As Integeri=3Call s(i)If i4 Then i=i^2MsgBox iEnd Sub窗体打开运行后,单击命令按钮,则消息框的输出结果为 【 12 】 。

考题 有如下VB程序段: Private Sub Command1_Click() Dim a As Long a=Val(Text1.Text) Print a End Sub 其中"Private Sub Command1_Click()"的作用是()。A、定义一个数据处理方法B、定义一个数据输入方法C、定义一个事件过程D、定义一个数据类型

考题 单选题假定有如下的Sub过程: SubS (x As Single, y As Single) t = x x = t / y y = t Mod y End Sub 在窗体上添加一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim a As Single Dim b As Singlea = 5: b = 4 S a, b Print a, b End Sub 程序运行时,单击命令按钮得到的结果()。A 54B 11C 1.254D 1.251