A.确认阶段
B.设计阶段
C.智力活动
D.选择阶段
第1题
设有以下函数过程
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)
第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)
第3题
设有以下函数过程
Private Function Fun(a()As Integer,b As String)As Integer
Ehd 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)
第4题
设有以下函数过程
Private Function Fun(a()As Integer,b As String)As Integer
Ehd 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)
第5题
设有以下函数过程:
Function fun(m As Integer) As Integer
Dim k As Integer, sum As Integer
sum = 0
For k = m To 1 Step -2
sum = sum + k
Next k
fun = sum
End Function
若在程序中用语句 s = fun(10) 调用此函数,则s的值为______。
第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 Sub
A.0
B.25
C.50
D.100
第7题
有如下函数过程。 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 Sub
A.0
B.25
C.50
D.100
第8题
设有以下函数过程: Function fun(a As Integer,b As Integer) Dim c As Integer If a<b Then c=a:a=b:b=C End IF c=0 Do c=c+a Loop Until c Mod b=0 fun=c End Function 若调用函数fun时的实际参数都是自然数,则函数返回的是()。
A.a、b的最大公约数
B.a、b的最小公倍数
C.a除以b的余数
D.a除以b的商的整数部分
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!