有如下的一个函数过程:Function fn(ByVal num As Long) Dim k As Long k= 1 num = Abs(num) do while num k = k * (num Mod 10) num= num\10 Loop fn=kEnd Function 以下是一个调用该函数的事件过程,在运行该程序后,在输入对话框中输入数字123,该过程的运行结果是 ______。Private Sub Command1_Click() Dim n As Long Dim r As Long n = CLng(n) r = fn(n) Print rEnd SubA.12B.6C.3D.1

有如下的一个函数过程:Function fn(ByVal num As Long) Dim k As Long k= 1 num = Abs(num) do while num k = k * (num Mod 10) num= num\10 Loop fn=kEnd Function 以下是一个调用该函数的事件过程,在运行该程序后,在输入对话框中输入数字123,该过程的运行结果是 ______。Private Sub Command1_Click() Dim n As Long Dim r As Long n = CLng(n) r = fn(n) Print rEnd Sub

A.12

B.6

C.3

D.1


相关考题:

以下程序的输出结果是【18】。unsigned fun6(unsigned num){ unsigned k=1;do{k *=num;num/=10;}while (num);return k;}main(){ unsigned n=26;printf("%d\n", fun6(n));}

有如下的一个函数过程: Function fn(By Val hum AS Long) Dim k As Long k=l num=Abs(nam) Do While nnm k=k*(nnm Mod 10) num=num\10 Loop fn=k End Function 以下是一个调用该函数的事件过程,运行程序后,在输入对话框输入数字“123”,该过程的运行结果是( )。 PrivateA.12B.6C.3D.1

面程序执行完后k的值是【 】。void main(){unsigned num=26,k=1;do{K * = num%10;num/ = 10;{while(num);cout<<k;}

下列给定程序中函数fun()的功能是计算正整数num的各位上的数字之平方和。例如:输入352,则输出应该是38;若输入328,则输出应该是77。请改正程序中的错误,使它能得到正确结果。注意:不要改动main函数,不得增行或删行,也不得更改程序的结构。试题程序:include <stdio.h>include <conio.h>long fun(long num){/*+**+*+*+*found************/long k=1;do{k+=(num%10)*(num%10);num/=10;/*********+found*+**+*+******/}while(num)return(k);}main(){long n;clrscr();printf("\Please enter a number:");scanf("%ld",n);printf("\n%ld\n",fun(n));}

在窗体画一个命令按钮,然后编写如下过程,程序运行后,单击命令按钮,在输入对话框中输入234,输出结果为 ______。 Function Fun(ByVal num 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=In put Box("请输入一个数") n=CLng(n) r=Fun(n) Print r End SubA.20B.24C.9D.28

在窗体画一个命令按钮,然后编写如下过程:Function fun(ByVal num As Long)As LoneDim k As Longk=1num=Abs (num)Do While numk=k*(num Mod 10)num=num\10Loopfun=kEnd FunctionPrivate Sub Command1_Click()Dim n As LongDim r As Longn= InputBox (“请输入一个数”)n=CLng (n)r=fun (n)Print rEnd Sub程序运行后,单击命令按钮,在输入对话框中输入234,输出结果为【 】。

以下程序的输出结果是unsigned fun6(unsigned num){ unsigned k=1; do{k *=num%10;num/=10;} while (num); return k;}main(){ unsigned n=26; printf("%d\n", fun6(n));}

先在窗体上添加一个命令按钮,然后编写如下程序: 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

先在 窗体上添加一个命令按纽,然后编写如下程序: 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