当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

设有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声明。()

  • 设有如下通用过程:Pubfic Function Fun(xStr As String)As StringDim tStr As String,strL As In

  • 某人为计算n!(0<n<=12)编写了下面的函数过程:Private Function fun(n As Integer)As LongD

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

  • 计算n!的函数过程如下:Private Function fact(n As Integer)As Longf = 1For i = 1 To nf =

  • 在窗体上有一个命令按钮Commandl,通用过程fun和命令按钮的事件过程如下: Private Function fun(B