网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有如下事件过程,单击命令按钮扣,输出结果为
Private Sub Command1_Click()
Dim b%(1 To 4) , j%, t#
For j=1 To 4
b(j) =j
Next j
t=Tax(b() )
Print "t="; t,
End Sub
Function Tax (a() As Integer)
Dim t#, i%
t=1
For i=2 To UBound(A.
t=t * a(i)
Next i
Tax=t
End Function( )。
A.t=18
B.t=24
C.t=30
D.t=32
参考答案
更多 “ 有如下事件过程,单击命令按钮扣,输出结果为Private Sub Command1_Click()Dim b%(1 To 4) , j%, t#For j=1 To 4b(j) =jNext jt=Tax(b() )Print "t="; t,End SubFunction Tax (a() As Integer)Dim t#, i%t=1For i=2 To UBound(A.t=t * a(i)Next iTax=tEnd Function( )。A.t=18B.t=24C.t=30D.t=32 ” 相关考题
考题
设有命令按钮Command1的单击事件过程,代码如下:Private Sub Command1_Click()Dim a(3,3)As IntegerFor i=1 To 3For j=1 To 3a(i,j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i,4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A.20B.7C.16D.17
考题
( 22 )命令按钮 Command1 的单击事件过程的代码如下:Private Sub Command1_Click( )Dim a(3 , 3)As IntegerFor i=1 To 3For j=1 To 3a(i , j)=i*j+iNext jNext iSum=0For i=1 To 3Sum=Sum+a(i , 4-i)Next iPrint SumEnd Sub运行程序,单击命令按钮,输出结果是( )。A ) 20B ) 7C ) 16D ) 17
考题
如果存在如下过程:Private Function FMax(a() As Integer)Dim First As Integer, Last As Integer, i As IntegerFirst=LBound(A)Last=UBound(A)Max=a(First)For i=First To LastIf a(i) Max Then Max=a(i)Next iFMax=MaxEnd Function在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()ReDim m(1 To 4) As Integerm(1) =20: m(2) =30: m(3) =50: m(4) =100c=FMax(m)Print cEnd Sub单击命令按钮,其输出结果为 【12】 。
考题
如果存在如下过程:Private Function Fun(a() As Integer)Dim First As Integer, Last As Integer, i As IntegerFirst=LBound(a)Last=UBound(a)Max=a(First)For i=First To LastIf a(i) Max Then Max=a(i)NextFun=MaxEnd Function在窗体上添加一个命令按钮,然后编写如下事件过程:Private Sub Command1_Click()ReDim m(1 To 4) As Integerm(1)=20: m(2)=30: m(3)=50: m(4)=100c=Fun(m)Print cEnd Sub单击命令按钮,其输出结果为 【 】。
考题
窗体上命令按钮Commandl的事件过程如下:Private Sub Command1_Click()Dim total As Integertotal=s(1)+s(2)Print totalEnd SubPrivate Function s(m As Integer)As IntegerStatic x As IntegerFor i=1 To mx=x+1Next is=xEnd Function运行程序,第3次单击命令按钮Command1时,输出结果为【 】。
考题
在窗体上画一个命令按钮(其名称为Command1),然后编写如下事件过程: Private Sub Command1_Click() Dim a(5,5)As Integer Dim i As Integer,j As Integer For i=1 To 3 For j=1 To 3 a(i,j)=(i-1)*3+j Print a(i,j) Next j Print Next i End Sub 程序运行后,单击命令按钮,在窗体上的输出结果是: ______。A.1 4 7 2 5 8 3 6 9B.1 2 3 4 5 6 7 8 9C.1 2 3 4 5 6 7 8 9D.没有输出
考题
有如下事件过程,单击命令按钮扣,输出结果是 Private Sub Command1 Click( ) Dim b% (1 To4) ,j%, t# For j=1 To 4 b(j) =j Next j t=Tax(b( ) ) Print "t="; t, End Sub Function Tax (a( ) As Integer) Dim t#, i% t=1 For i=2 To UBound (A)t=t * a(i) Next i Tax=t End FunctionA.t=18B.t=24C.t=30D.t=32
考题
有如下Sub过程:Sub ind(a As Integer)Static x As Integerx= x + aPrint x:End Sub以下是调用它的事件过程,程序运行后,单击命令按纽Command1三次,输出结果为【 】。Private Sub Command1_Click()Ind 2End Sub
考题
( 15 )在窗体上添加一个命令按钮(名为 Command1 ),然后编写如下事件过程:Private Sub Command1_Click ()Dim b,kFor k=1 to 6b=23+kNext kMsgBox b+kEnd Sub打开窗体后,单击命令按钮,消息框的输出结果是 【 15 】 。
热门标签
最新试卷