[单项选择题] 先在 窗体上添加一个命令按纽,然后编写如下程序: Function fun(ByVal nm As Long)As Long Dim k As Long k=1 num=

25 查阅

[单项选择题] 先在 窗体上添加一个命令按纽,然后编写如下程序:

Function fun(ByVal nm As Long)As Long

Dim k As Long

k=1

num=Abs(num)

Do While num

k=k*(num Mod 10)

num=num10

Loop

fun=k

End Function

Private Sub Command1_Click()

Dim n As Long

Dim r As Long

n=InputBox(“请输入一个数”)

n=CLng(n)

r=fun(n)

Print r

End Sub

则在程序运行后,单击命令按纽,在对话框中输入“100”,输出结果是______。

A.0

B.100

C.200

D.300

参考答案:

A

计算机考试