F.unction Fun(a As Integer)
Static c
b=0:b=b+1:c=c+1
F.un=a+b+c
E.nd Function
在窗体上添加一个命令按钮,事件过程如下:
Private Sub Command1_Click()
D.im a As Integer
a=2
F.or i=1 To 3
Print Fun(a);
Next
E.nd Sub
运行该程序,单击命令按钮,输出结果是
A.4 4 4
B.4 5 6
C.6 7 8
D.4 7 9
[单选题]有如下一个函数过程: 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(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 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 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 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(a As Integer,n As Integer)As Integer Dim m AS Integer While a>=n a=a-n:m=m+1 Wend Fun=m End Function 该函数的返回值是。 A.a乘以n的乘积 B.a加n的和 C.a减n的差 D.a除以n的商(不含小数部分)
[单选题]有如下函数过程:F.unction Fun(By Val x As Ingeger, ByVal y As Integer)As IntegerD.o While … y <>0reminder=x Mod yx=yy=reminderLoopF.un=xE.nd Function以下是调用该函数的事件过程,该程序的运行结果是Private Sub Command1D.im a As IntegerD.im b As Integera=100:b=25x=Fun(a,b)Print
[单选题]有如下函数过程。 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
[单选题]有如下函数过程:F.unction Fun(By Val x As Ingeger,ByVal y As Integer) As IntegerD.O While …y<>0reminder=x Mod yx=yy=reminderLoopF.un=xE.nd Function以下是调用该函数的事件过程,该程序的运行结果是Private Sub Command1_Click()D.im a As IntegerD.im b As Integera=100:b=25x=Fun(a,B)Print
[单选题]有如下函数过程。F.unction Fun(By Val x As Integer,By Val y As Integer)As IntegerD.o While y<>0reminder=x Mod yx=yy=reminderLoopF.un=xE.nd Function以下调用函数的事件过程,该程序的运行结果是Private Sub Command7_Click()D.im a As Integer,b As Integera=100:b=25x=Fun(a,B)Print x