先在 窗体上添加一个命令按纽,然后编写如下程序: 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=num\10 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. 0B.100C.200D.300
先在 窗体上添加一个命令按纽,然后编写如下程序: 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=num\10 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
相关考题:
在窗体上添加一个命令按钮(名为Command1),然后编写如下程序:Private Sub Command1_Click()Dim a As Integer,b As Integerx=10y=20End Sub打开窗体运行后,单击命令按钮,消息框的输出结果为( )。
有如下SUB过程:Sub s(x As Single,y As Single)t =xx=t / yY=t Mod yEnd Sub在窗体上添加一个命令按纽,然后编写如下事件过程:Private Sub Form_ Click()Dim a As SingleDim b As Singlea=5b=4s a,bPrint a,bEnd Sub则程序运行后,单击命令按纽,输出的结果为:【 】。
先在窗体上添加一个命令按钮,然后编写如下程序: Function fun(ByValnum As Long)As Long Dim k As Long k=1 num=Abs(nam) Do While num k=k*(num Mod 10) num=num\10 Loop Fun=k End Function PrivateSubCommandl_ClickA.0B.100C.200D.300
在窗体上添加如下命令按纽,然后编写如下事件过程: Private Sub Command1_Click() Dim a(10)As Integer Dim p(3)As Integer k= 5 For i = 1 To 10 a(i) = i Next i For i = 1 To 3 p(i) = a(i * i) Next i For i = 1 To 3 k = k + p(i) * 2 Next i Print k End Sub该过程的运行结果为______。A.35B.33C.31D.29
在窗体中添加一个命令按钮,名称为Commandl,然后编写如下程序:窗体打开运行后,单击命令按钮,则消息框的输出结果为__________。