题目详情
当前位置:首页 > 职业培训考试
题目详情:
发布时间:2023-10-09 03:46:11

[单项选择]以下用户自定义函数 Function Func(a As Integer,b As Integer) As Integer Static m As Integer,i As Integer m=0:i=2 i=i+m+i m=i+a+b Func=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim k As Integer,m As Integer,p As Integer k=4:m=1 P=Func(k,m) Print p End Sub 程序运行后,单击命令按钮,输出结果为
A. 8
B. 9
C. 10
D. 11

更多"以下用户自定义函数 Function Func(a As Inte"的相关试题:

[单项选择]以下用户自定义函数 Function Func(a As Integer,b As Integer)As Integer Static m As Integer.i As Integer  m=0:i=2  i=i+m+i  m=i+a-i-b  Func=m End Function 在窗体上画一个命令按钮,然后编写如下事件过程: Private Sub Command1_Click( ) Dim k As Integer,m As Integer,p As Integer   k=4:m=1   P=Func(k,m)   Print P End Sub 程序运行后,单击命令按钮,输出结果为
A. 8
B. 9
C. 10
D. 11
[单项选择]以下用户自定义函数
Function Func(a As Integer, b As Integer) As Integer
Static m As Integer, i As Integer
m=0:i=2
i=i+m+i
m=i+a+b
Func=m
End Function
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command1_Click( )
Dim k As Integer,m As Integer,p As Integer
k=4:m=1
P=Func(k,m)
Print p
End Sub
程序运行后,单击命令按钮,输出结果为
A. 8
B. 9
C. 10
D. 11
[单项选择]有下列函数过程:
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_Chck( )
Dim P As Integer, k As Integer, m As Integer
k=4
m=1
P=Func2(k,m)
Print k;m
P=Func2(km)
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 As Integer)As Integer

Staticm 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 Inmger,m As Integer

k=4

m=1

p=Func2(k,m)

Prim 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 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=Fune2(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 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 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的值为 _________。
[填空题]

设有以下函数过程:
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=stlm
End Function
若在程序中用语句s=fun(10)调用此函数,则s的值为()。


[单项选择]阅读下列程序:
Function func(n As Integer)As Integer
Sum = 0
For i = 1 To n
Sum = Sum + (i + 1)* i
Next i
func = Sum
End Function.
Private Sub Command1_Click ( )
Dim a As Integer
a= 5
s = func (A)
Print s
End Sub
程序运行后,单击命令按钮,输出的结果为
A) 80 B) 60 C) 70 D) 15
[单项选择]设有以下函数过程:
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的商的整数部分
[单项选择]阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click( ) Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.
A. 16
B. 21
C. 26
D. 31
[单项选择]假定有下面的过程:
Function Func(a As Integer,b As Integer)As Integer
Static m As Integer,i As Integer
m=0
i=2
i=i+m+1
m=i+a+b
Func=m
End Function
在窗体上画一个命令按钮,然后编写如下事件过程:
Private Sub Command 1_Click( )
Dim k As Integer,m As Integer
Dim p As Integer
k=4
m=1
p=Func(k,m)
Print p;
p=Func(k,m)
Print p
End Sub
程序运行后,单击命令按钮,输出结果为( )。
A. 8 17
B. 8 16
C. 8 20
D. 8 8

我来回答:

购买搜题卡查看答案
[会员特权] 开通VIP, 查看 全部题目答案
[会员特权] 享免全部广告特权
推荐91天
¥36.8
¥80元
31天
¥20.8
¥40元
365天
¥88.8
¥188元
请选择支付方式
  • 微信支付
  • 支付宝支付
点击支付即表示同意并接受了《购买须知》
立即支付 系统将自动为您注册账号
请使用微信扫码支付

订单号:

请不要关闭本页面,支付完成后请点击【支付完成】按钮
恭喜您,购买搜题卡成功
重要提示:请拍照或截图保存账号密码!
我要搜题网官网:https://www.woyaosouti.com
我已记住账号密码