[单选题]

若有如下的函数过程: Function Func2(a As Integer, b As Integer)As Integer Static m As Integer, i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2 = m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p As Integer, k As Integer, m As Integer k=4 m=1 p = Func2(k, m) Print k; m p = Func2(k, m) Print k; m End Sub 程序运行后,单击命令按钮,输出结果为( )。

A.3 6<CR>3 6

B.3 6<CR>3 11

C.3 11<CR>3 6

D.3 11<CR>3 11

参考答案与解析:

相关试题

有如下的函数过程: Function Func2(a As Integer, b

[单选题]有如下的函数过程: Function Func2(a As Integer, b As Integer)'As Integer Static m As Integer, i As Integer m=0 i=2 a=i+m+1 b=i+a+b Func2=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim p As Integer, k As Integer, m As Integer k=4 m=1

  • 查看答案
  • 有下列函数过程:Function Func2(a As Integer,b As

    [单选题]有下列函数过程:F.unction Func2(a As Integer,b As Integer)As IntegerStaticm As Integer,i As Integerm=0i=2a=i+m+1b=i+a+bF.unc2=mE.nd Function在窗体上画一个命令按钮,然后编写下列事件过程:Private Sub Command1_Click()D.im p As Integer,k As Inmger,m As Integerk=4m=1p=Func2(k,m)Prim k;

  • 查看答案
  • (27)下列函数过程 Function Func(a As Integer,b

    [单选题](27)下列函数过程 Function Func(a As Integer,b As Integer)As Integer Static m As Integer,i As Integer M=0 i=2 A=i+m+1 b=i+a+b Func2=m End Function Private Sub Command1_Click() Dim p As Integer,k As Integer,m As Integer k=4 m=1 P=Func2(k,m) Print k;m End Sub

  • 查看答案
  • 有如下函数过程:Function lj(x As Integer)As Long

    [单选题]有如下函数过程: Function lj(x As Integer)As Long Dims As Long Dimi As Integer s=0 Fori=1 To x s=s+i Nexti lj=s End Funcfion 在窗体上添加一个命令按钮,名为Commandl,编写事件过程调用该函数,输出结果为 ( )。 Private Sub Commandl_lick()A.25B.35C.45D.55

  • 查看答案
  • 有如下函数过程:Function Fun(By Val x As Integer

    [单选题]有如下函数过程: Function Fun(By Val x As Integer,By Val y As Integer)As Integer Do While Y<>0 reminder=x Mod y x=y y=reminder Loop Fun=x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub Command7_Click() Dim a As Integer,b As Integer a=100:b=25 x=Fun(a,B) Prin

  • 查看答案
  • 有如下函数过程:Function funl(ByVal x As Integer

    [单选题]有如下函数过程: Function funl(ByVal x As Integer,ByVal y As Integer)As Integer Do While y<>0 reminder=x Mod y x=y y=reminder Loop fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100 b=25 x=

  • 查看答案
  • 有如下函数过程:Function gys(ByVal x As Integer,

    [单选题]有如下函数过程: Function gys(ByVal x As Integer,ByVal y As Integer) As Integer Do While y<>0 reminder = x Mod y x=y y=reminder Loop gys=x End Function以下是调用该函数的事件过程,该程序的运行结果是______。 Private Sub Command7_Click() Dim s As Integer Dim b As Integer a=100 b=25 x=

  • 查看答案
  • 有如下一个函数过程: Function Fun(a As Integer) St

    [单选题]有如下一个函数过程:F.unction Fun(a As Integer)Static cb=0:b=b+1:c=c+1F.un=a+b+cE.nd Function在窗体上添加一个命令按钮,事件过程如下:Private Sub Command1_Click()D.im a As Integera=2F.or i=1 To 3Print Fun(a);NextE.nd Sub运行该程序,单击命令按钮,输出结果是A.4 4 4B.4 5 6C.6 7 8D.4 7 9

  • 查看答案
  • 有如下一个函数过程:Function Fun(a As Integer)Stat

    [单选题]有如下一个函数过程: Function Fun(a As Integer) Static C b=0:b=b+1:c=c+1 Fun=a+b+c End Function 在窗体上添加一个命令按钮,事件过程如下: Private Sub Command1_Click() Dim a As Integer a=2 For i=1 To 3 Print Fun(a); Next End Sub 运行该程序,单击命令按钮,输出结果是A.4 4 4B.4 5 6C.6 7 8D.4 7 9

  • 查看答案
  • 设有以下函数过程:Function fun(a As Integer,b As

    [单选题]设有以下函数过程:F.unction fun(a As Integer,b As Integer)D.im c As IntegerIf a<b Thenc=a:a=b:b=CE.nd IFc=0D.oc=c+aLoop Until c Mod b=0fun=cE.nd Function若调用函数fun时的实际参数都是自然数,则函数返回的是( )。A.a、b的最大公约数B.a、b的最小公倍数C.a除以b的余数D.a除以b的商的整数部分

  • 查看答案
  • 若有如下的函数过程:Function Func2(a As Integer, b