在应用程序中用Private Function fun(x As Integer,y AsInteger)定义了函数fun,调用函数fun的过程中的变量I,J均定义为Integer型,能正确引用函数fun的是()。 ①fun(I,J) ②Callfun(I,3.65) ③fun(3.14,234) ④fun(245,231.5)A、①③B、②③④C、①②③D、①②③④

在应用程序中用Private Function fun(x As Integer,y AsInteger)定义了函数fun,调用函数fun的过程中的变量I,J均定义为Integer型,能正确引用函数fun的是()。 ①fun(I,J) ②Callfun(I,3.65) ③fun(3.14,234) ④fun(245,231.5)

  • A、①③
  • B、②③④
  • C、①②③
  • D、①②③④

相关考题:

有如下函数过程:Function Fun(By Val x As Ingeger,ByVal y As Integer) As IntegerDO While …y<>0reminder=x Mod yx=yy=reminderLoopFun=xEnd Function以下是调用该函数的事件过程,该程序的运行结果是Private Sub Command1_Click()Dim a As IntegerDim b As Integera=100:b=25x=Fun(a,B)Print xEnd SubA.0B.25C.50D.100

在窗体上画一个名称为Commandl的命令按钮,然后编写如下通用过程和命令按钮的事件过程: Private Function fun(By Val m As Integer) If m Mod 2=0 Then fun=2 Else fun=1 End If End Function Private Sub Commandl_Click() Dim i As Integer,s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,在窗体上显示的是______。A. 6B.7C.8D.9

设有以下函数过程:Function fun(m As Integer) As IntegerDim k As Integer, sum As Integersum = 0For k = m To 1 Step -2sum = sum + kNext kfun = sumEnd Function若在程序中用语句 s = fun(10) 调用此函数,则s的值为______。

下列程序运行后,单击命令按钮,窗体显示的结果为( )。 Private Function pl(x As Integer,y As Integer,z As Integer) pl=2*x+y+3*z End Function Private Function p2(X As Integer,y As Integer,z As Integer) p2=p1(z,y,x)+x End Function Private Sub Commandl_Click()A.23B.19C.21D.22

下列程序运行后的输出结果是 Function Fun(n) x=n*n Fun=x一11 End Function Private Sub Command1_Click() For k=1 To 2 Y=Fun(k):Print Y Next End SubA. -10 -7B.10 8C.1 3D.0 4

(27)有下列函数过程( )。 Function fun1(By Val x As Integer,By Valy As Integer) As Integer Do While y0 reminder=x Mody x=y y=reminnder Loop Fun1=x End Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是。 Private Sub Command1_Click() Dim a As Integer Dim b As Integer a=100 b=25 x=funl(a,b) Print x End Sub A.0 B.25 C.50 D.100

有如下函数过程: Function fun1(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=fun1(a,B) Print x End SubA.0B.25C.50D.100

窗体上有一个名称为Text1的文本框和一个名称为Command1、标题为“计算”的命令按钮,如图所示。函数fun及命令按钮的单击事件过程如下,请填空。Private Sub Command1_Click()Dim x As Integerx=Val(InputBox(“输入数据”))Text1=Str(fun(x)+fun(x)+fun(x))End SubPrivate Function fun(ByRef n As Integer)Ifn Mod 3=0 Thenn=n+nElsen=n*nEnd If________=nEnd Function当单击命令按钮,在输入对话框中输入2时,文本框中显示的是_______。

设有以下函数过程 Private Function Fun(a( )As Integer,b As String)As Integer … End Function 若已有变量声明: Dim x(5)As Integer,n As Integer,ch As String 则下面正确的过程调用语句是( )。A.x(O)=Fun(x."ch")B.n=Fun(n.ch)C.CallFun X,"ch"D.n=Fun(x(5),ch)

在窗体上画一个命令按钮(名称为Command1),并编写下列代码: Function Fun1(ByVa1 a As Integer,b As Integer)As Integer Dim t As Integer t=a-b b=t+a Fun1=t+b End Function Private Sub Command1Click( ) Dim X As Integer x=10 Print Fun1(Vun1(X,(Fun1(x,x-1))),x-1) End Sub 程序运行后,单击命令按钮,输出结果是( )。A.10B.0C.11D.21

在窗体上画一个名称为Command1命令按钮,然后编写如下事件过程: Private Function fun1(n As Integer)As Integer Dim k As Integer If n = 1 Then k = 1 Else k = 1 + fun1(n - 1)* 2 End If fun1 = k End Function Private Sub Command1_Click () Dim m As Integer, x As Integer x = 4 m = fun1 (x) Print m End Sub 程序运行后,单击命令按钮,则窗体上显示的内容是A.4B.6C.9D.15

设有以下函数过程Private Function Fun(a()As Integer,b As String)As IntegerEhd Function若已有变量声明:Dim x(5)As Integer,n As Integer,ch As String则下面正确的过程凋用语句是A.x(0)=Fun(x,“ch”)B.n=Fun(n,ch)C.Call Fun x,“ch”D.n=Fun(x(5),ch)

有下列函数过程:Function fun1(ByVal x As Integer,ByVal y As Integer)As IntegerDo While y<>0reminder=x Mod yx=yy=reminderLoopfun1=xEnd Function 在下列按钮单击事件中调用该函数,则该程序的运行结果是( )。Private Sub Command1_Click()Dim a As IntegerDim b As Integera=100b=25x=fun1(a,B)Print xEnd SubA.0B.25C.50D.100

有如下的程序: Private Sub Command1_Click() Dim k As Integer,m As Integer Dim P As Integer k=4:m=1 P=Fun(k,m):Print P; P=Fun(k,m):Print P End Sub Private Function Fun(a As Integer,b As Integer) Static m As Integer,i As Integer in=5:i=2 i=i+m+1 m=i+a+b Fun=m\2 End Function 单击命令按钮后,输出结果为A.2 2B.4 4C.5 5D.6 6

有如下函数过程: 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) Print x End SubA.0B.25C.50D.100

在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click () Dim a As Integer, b As Integer, c As Integer a = 1: b = 2: c = 3 Print fun2 (c, b,A)End Sub Private Function funl (x As Integer, y As Integer, z As Integer) fun1 = 2 * x + y + 3 * z End Function Private Function fun2(x As Integer, y As Integer, z As Integer) fun2 = fun1(z, x, y)+ x End Function程序运行后,单击命令按钮,则窗体上显示的内容是A.7B.14C.17D.30

有下列函数过程: Function fun1(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 aA.0B.25C.50D.100

有如下函数过程。 Function Fun( By Val x As Integer,By Val y As Integer) As Integer Do While y <> 0 reminder = x Mod y xmy y = reminder Loop Fun = x End Function 以下调用函数的事件过程,该程序的运行结果是 Private Sub CommandT_Click( ) Dim a As Integer,b As Integer a = 100:b =25 x =Fun(a,B)Print x End SubA.0B.25C.50D.100

程序如下:Private Sub form_ Activate() Dim a As Integer for i=4 To 5 a=fun(i) Print a, Next iEnd SubPrivate Function fun(n)As Integer if n >0 then fun =n* fun(n-1) Else fun=1 End ifEnd Function 程序最后打印结果是______。A.4 5B.12 120C.24 120D.24 60

在窗体上画一个按钮,然后编写如下事件代码。单击按钮,输出为 ______。 Private Function fun3(x As Integer) Static t As Integer t = t + 3 t = t + x fun3 = t End Function Private Sub Commandl Click() Dim a As Integer, b As Integer, c As Integer a = 2 : b = 1 c = fun3 (A)c = fun3 (B)Print c End SubA.6B.8C.9D.12

在窗体上有一个命令按钮Command1,通用过程fun和命令按钮的事件过程如下: Private Function fun(ByVal m As Integer) If m Mod 2 = 0 Then fun=2 Else fun=1 End If End Function Private Sub Command1_Cliek() Dim i As Integer, s As Integer s=0 For i=1 To 5 s=s+fun(i) Next Print s End Sub 程序运行后,单击命令按钮,则窗体上输出( )。A.6B.7C.8D.9

在窗体上画一个按钮,然后编写如下的事件代码。在按钮上单击,输出为( )。 Private Function fun(x As Integer,y As Integer) Static m As Integer Static i As Integer i=i+2 i=i+m+1 m=i+x+y fun=m End Function Private Sub Command1_Click() Dim j As Integer,m As Integer,k As Integer j=4:m=1 k=fun(j,m) Print k; k=fun (j,m) Print k End SubA.8 18B.7 17C.7 19D.8 19

窗体上有Text1、Text2两个文本框及一个命令按钮Command1,编写下列程序 Dim y As Integer Private Sub Command1_Click() Dim x As Integer X=2 Text1.Text=Fun2(Fun1(x),y) Text2.Text=Fun1(x) End Sub Private Function Fun1(x As Integer)As Integer x=x+y:y=x+y Fun1=x+y End Function Private Function Fun2(x As Integer,y As Integer)As Integer Fun2=2*x+y End Function 当单击1次和单击2次命令按钮后,文本框Textl和Text2内的值分别是A.2 4 2 4B.2 4 4 8C.10 10 58 58D.4 4 8 8

有如下函数过程: Function fun1 (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=fun1(a,b)Print x End SubA.0B.25C.5OD.100

以下是子过程或函数过程定义中的开始语句,错误的为()。A、Private Function f( x As String ) As SingleB、Private Function f( x As String )C、Private Sub f( x As String ) As SingleD、Private Sub f( x As String )

单选题在应用程序中用Private Function fun(x As Integer,y AsInteger)定义了函数fun,调用函数fun的过程中的变量I,J均定义为Integer型,能正确引用函数fun的是()。 ①fun(I,J) ②Callfun(I,3.65) ③fun(3.14,234) ④fun(245,231.5)A①③B②③④C①②③D①②③④

单选题定义两个过程Private Sub Fun 1(S as String)和Private Sub Fun2 (a( )as String*6),在调用过程中用Dim St (6) as String*6定义了一个字符串数组。下面调用语句中正确的有()。 ①Call Fun1(St(3)) ②Call Fun2(St) ③Call Fun1(St) ④Call Fun2(st(6))A①②B①③C②③D②