题目内容 (请给出正确答案)
[主观题]

设有Function过程:Private Function f(a As Integer, b As Integer) As Integera = a * a:b

设有Function过程:

Private Function f(a As Integer, b As Integer) As Integer

a = a * a:

b = b * b

f = CInt(Sqr(a - b))

End Function

则如下程序段的运行结果是()。

Private Sub Command1_Click()

Dim X As Integer, Y As Integer

X = 5: Y = 4

a = f(X, Y)

Print a

End Sub

A. 5

B. 4

C. 3

D. 9

查看答案
如搜索结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能会需要:
您的账号:
发送账号密码至手机
发送
更多“设有Function过程:Private Function …”相关的问题

第1题

设有以下函数过程 Private Function Fun(a()As Integer,b As String)As Integer … End Functio

设有以下函数过程 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若

设有以下函数过程

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 IntegerEhd Function若已

设有以下函数过程

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题

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:Private Sub Command1_Click() S

设有一个命令按钮Command1的事件过程以及一个函数过程,程序如下:

Private Sub Command1_Click()

Static x as integer

X=f(x+5)

Cls

Print x

End Sub

Private function f(x as integer)as integer

F=x+x

End function

连续单击命令按钮3次,第3次单击命令按钮后,窗体上显示的计算结果是

A)10

B)30

C)60

D)70

点击查看答案

第5题

设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下:Private Sub Command1 Click()

设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下:

Private Sub Command1 Click()

Static x A S Integer

x=f(x+5)

Cls

Print X

End Sub

Private Function f(x As Integer)As Integer

f=x+x

End Function

连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是()。

A.10

B.30

C.60

D.70

点击查看答案

第6题

(23)设有以下函数过程Private Function Fun(a() As Integer, b As String) As Integer...End Fun

(23)设有以下函数过程

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)Call Fun x, "ch"

D)n=Fun(x(5), ch)

点击查看答案

第7题

设有一个命令按钮Command1的事件过程以及一个函数过程。程序如下: Private Sub Command1 Click(
) Static x A S Integer x=f(x+5) Cls Print X End Sub Private Function f(x As Integer)As Integer f=x+x End Function 连续单击命令按钮3次,第3次单击命令按钮后,窗体显示的计算结果是()。

A.10

B.30

C.60

D.70

点击查看答案

第8题

(31)设有如下通用过程: Public Function Fun(xStr As String)As String Dim tStr As String, st

(31)设有如下通用过程:

Public Function Fun(xStr As String)As String

Dim tStr As String, strL As Integer

tStr=""

strL=Len(xStr)

i=1

i=i+1

Loop

Fun=tStr

End Function

在窗体上画一个名称为 Command1 的命令按钮。然后编写如下的事件过程:

Private Sub Command1_Click()

Dim S1 As String

S1="abcdef"

Print UCase(Fun(S1))

End Sub

程序运行后,单击命令按钮,输出结果是()。

A)ABCDEF

B)abcdef

C)AFBECD

D)DEFABC

点击查看答案

第9题

设有如下通用过程:Public Function f(x As Integer)Dim y As Integerx = 20y = 2f = x * yEnd Fu

设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x = 20 y = 2 f = x * y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Commandl Click() Static x As Integer x = 10 y = 5 y = f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是

A.10 5

B.20 5

C.20 40

D.10 40

点击查看答案

第10题

设有如下通用过程:Public Function f(x As Integer)Dim y As Integerx=20y=2f=x*yEnd Function在

设有如下通用过程: Public Function f(x As Integer) Dim y As Integer x=20 y=2 f=x*y End Function 在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Static x As Integer x=10 y=5 y=f(x) Print x;y End Sub 程序运行后,如果单击命令按钮,则在窗体上显示的内容是()。

A.10 5

B.20 5

C.20 40

D.10 40

点击查看答案
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
温馨提示
每个试题只能免费做一次,如需多次做题,请购买搜题卡
立即购买
稍后再说
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“赏学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
赏学吧
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反赏学吧购买须知被冻结。您可在“赏学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
赏学吧
点击打开微信