如果存在如下过程: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_Clic

题目

如果存在如下过程:

Private Function Fun(a() As Integer)

Dim First As Integer, Last As Integer, i As Integer

First=LBound(a)

Last=UBound(a)

Max=a(First)

For i=First To Last

If a(i) > Max Then Max=a(i)

Next

Fun=Max

End Function

在窗体上添加一个命令按钮,然后编写如下事件过程:

Private Sub Command1_Click()

ReDim m(1 To 4) As Integer

m(1)=20: m(2)=30: m(3)=50: m(4)=100

c=Fun(m)

Print c

End Sub

单击命令按钮,其输出结果为 【 】。


相似考题
更多“如果存在如下过程: Private Function Fun(a() As Integer) Dim First As Integer, Last As Integ ”相关问题
  • 第1题:

    数组q[M]存储一个循环队,first和last分别是首尾指针。当前队中元素个数为_____。

    A.(last- first+M)%M

    B.last-first+1

    C.last-first-1

    D.last-first


    (last- first+M)%M

  • 第2题:

    8、下面哪些是将分数化为浮点数的正确定义?

    A.type Fraction = (Integer, Integer) rateq :: Fraction -> Float rateq (a,b) = a/b###SXB###B.type Fraction = (Integer, Integer) rateq :: Fraction -> Float rateq (a,b) = (fromInteger a)/ (fromInteger b)###SXB###C.type Fraction = (Integer, Integer) rateq :: Fraction -> Float rateq (a,b) = fromInteger (a/b)###SXB###D.type Fraction = (Integer, Integer) rateq :: Fraction -> Float rateq (a,b) = (fromIntegral a)/ (fromIntegral b)###SXB###E.ty
    A

  • 第3题:

    11、下面哪些定义是类型正确的?

    A.f :: (Integer, Integer) -> Float f (x,y) = x / y

    B.f :: (Integer, Integer) -> Float f (x,y) = (fromInteger x) / (fromInteger y)

    C.f :: (Integer, Integer) -> Float f (x,y) = 3*x + y

    D.f :: (Integer, Integer) -> Integer f (x, y) = 3*x + y


    AFT 通常由含有一个双氢呋喃环和一个氧杂萘邻酮(香豆素)的基本架构单位构成 AFT 分为 黄曲霉毒素B1(AFB1)、黄曲霉毒素 B2 (AFB2) 黄曲霉毒素G1(AFG1)、黄曲霉毒素 G2(AFG2) 黄曲霉毒素M1(AFM1)、黄曲霉毒素 M2(AFM2) B1、G1的呋喃环氢键异构。M1型氢键变为羟基。 1比2呋喃环上多了一个双键。

  • 第4题:

    11、数组q[M]存储一个循环队,first和last分别是首尾指针。如果使元素x出队操作的语句为“first=(first+1)%m, x=q[first];”。那么元素x进队的语句是_____。

    A.last=(last+1)%m,q[last]=x;

    B.x=q[last], last =(last+1)%m;

    C.q[last+1]=x;

    D.q[(last+1)%m]=x;


    (last+1)%m= =first

  • 第5题:

    1、数组q[M]存储一个循环队,first和last分别是首尾指针。当前队中元素个数为_____。

    A.(last- first+M)%M

    B.last-first+1

    C.last-first-1

    D.last-first


    4和0