网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
以下能够正确计算n!的程序是( )。
A.Private Sub Commandl_C1ick()
B.hiVate Sub Commandl_C1ick() n=5:x=1 n=5:x=1:i=1 DO DO X=x*1 X=X*1 i=i+1 i=i+1 Loop while i<n Loop While<n Print x Ptinte x End Sub End Sub
C.Private Sub Commandl_Click ()
D.Pdvate Sub Commandl C1ick() n=5:X=1:i=1 n=5=:x=1:i=1 DO DO X=X*1 X=X*1 i=i+1 i=i+1 Loop While i>n Print x Print x End Sub End Sub
参考答案
更多 “ 以下能够正确计算n!的程序是( )。A.Private Sub Commandl_C1ick()B.hiVate Sub Commandl_C1ick() n=5:x=1 n=5:x=1:i=1 DO DO X=x*1 X=X*1 i=i+1 i=i+1 Loop while i<n Loop While<n Print x Ptinte x End Sub End SubC.Private Sub Commandl_Click ()D.Pdvate Sub Commandl C1ick() n=5:X=1:i=1 n=5=:x=1:i=1 DO DO X=X*1 X=X*1 i=i+1 i=i+1 Loop While i>n Print x Print x End Sub End Sub ” 相关考题
考题
有以下程序:int sub(int n) { return(n/10+n%10); }void main(){ int x,y; scanf("%d",x); y=sub(sub(sub(x))); printf("%d\n",y);}若运行时输入:4321回车,程序的输出结果是。
考题
以下能够正确计算n!的程序是( )。A.Private Sub Command1_Click()n=5: x=1Dox=x * II=I + 1Loop While I nPrint xEnd SubB.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I nPrint xEnd SubC.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I =nPrint xEnd SubD.Private Sub Command1_Click()n=5: x=1: I=1Dox=x * II=I + 1Loop While I nPrint xEnd Sub
考题
下列程序用来计算1+2+…n,当和大于100时停止计算,请填空。Private Sub Form_Click()Dim n as integer,s as integer,I as integer,k as integers=0k=0n=inputbox(″请输入n的值)For i=1 to 100k=k+1s=s+I【 】Next iPrint sEnd Sub
考题
运行以下程序后,输出结果为_____________。 Private Sub Command1_Click() a=1:b=2:c=3 Call test(a,b+3,(c)) Print "main:";a;b;c End Sub Private Function test(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub:";p;m;n End Function:A. sub:2 6 4 main:1 2 3B. sub:2 6 4 main:2 2 3C. sub:2 6 4 main:2 6 4D. sub:2 6 4 main:1 6 4
考题
有如下事件过程: Private Sub Command1_Click( ) Dim m AS Integer,n AS Integer m=2:n=1 Print "m=";m;"n=";n Call TOD(m,n) Print "m=";m;"n=";n End Sub Sub TOD(x,y) x=x^2 y=y^3 End Sub 程序运行后,输出的结果为A.m=2,n=1 m=1,n=2B.m=2,n=1 m=4,n=1C.m=1,n=2 m=1,n=4D.m=1,n=2 m=2,n=4
考题
设程序中有如下数组定义和过程调用语句: Dim a(10)As Integer … Call D(a) 如下过程定义巾,正确的是( )。A.Private Sub p(a As Integer)B.Private Sub p(a( )As Integer)C.Private Sub p(a(10)As Integer)D.Private Sub p(a(n)As Integer)
考题
以下程序的输出结果是【 】。main(){ int x=0;sub(x,8,1);printf(“%d\n”,x);}sub(int *a,int n,int k){ if(k<=n)sub(a,n/2,2*k);*a+=k;}
考题
以下能够正确计算n!的程序是A.Private Sub Command1_Chck( ) n=5:x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click( ) n=5:x=1:i=l Do x=x*i i=i+1 Loop While i<=n Print x End SubD.Private Sub Command1_Click( ) n=5:x=1:i=l Dox=x*i i=i+1 Loop While i>n Print x End Sub
考题
有以下程序:int sub(int n) { return(n/10+n%10); }main(){ int x, y;scanf("% d", x);y=sub(sub(sub(x)));printf("% d\n", y);}若运行时输入:1234<回车>,程序的输出结果是【 】。
考题
若有如下程序: int sub(int m) { if(m==1||m==0) return 2; else return(sub(m-1)*sub(m-2));} main() { int n; scanf("%d",n); printf("%d",sub(n)); } 如果从键盘输入4<回车>,则程序运行后的输出结果是( )。A.8B.16C.24D.32
考题
以下能够正确计算n!的程序是A.Private Sub Command1 Click() n=5:x=1 Do x=x * I I=I + 1 Loop While I < n Print x End SubB.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X*I I=I + 1 Loop While I <n Print x End SubC.Private Sub Command1_Click() n=5:X=1:I=1 Do X=X * I I=I + 1 Loop While I<=n Print X End SubD.Private Sub Command1_Click() n=5:X=1:I=1 Do x=x * I I=I + 1 Loop While I>n Print X End Sub
考题
下列程序的运行结果是______。Sub abcd(ByValn As Integer)n=n+5End SubPrivate Sub Form_Click()nx%=3Callabcd(nx%)Printnx%End Sub
考题
有以下程序int sub(int n){ return(n%10+n/10); }main(){ int x,y; scanf("%d",x); y=sub(sub(x)); printf("%d\n",y);}若运行时输入:248回车,程序的输出结果是
考题
以下程序段中Do...Loop 循环执行的次数为【 】。程序执行完毕后,n的值为【 】。Private Sub Command1_Click()n =5DoIf n Mod 2= 0 Thenn =n \2Elsen =n* 3 + 1End IfLoop Until n=1End Sub
考题
以下程序的输出结果是( )。 include main()fint x=0; sub(x,16,2); printf("%d\n",
以下程序的输出结果是( )。include<stdio.h>main()fint x=0;sub(x,16,2);printf("%d\n",x);}sub(int*a,int n,int k){if(k<=n) sub(a,n/2,2*k);*a+=k;}
考题
以下能够正确计算n!的程序是A.Privas Sub Command1_Click() n=5:x=1 Do x=x*i i=i+1 Loop While i<n Print x End SubB.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i<n Print x End SubC.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop while i<=n Print x End SubD.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
考题
窗体中有3个命令按钮,分别命名为Commandl、Command2和Command3。当单击Cmmandl按钮时,Command2按钮变为可用,Command3按钮变为不可见。下列Corn.mandl的单击事件过程中,正确的是A.Private Sub Commandl—click() Command2.ViSible=True Command3.ViSible=False End SubB.Private Sub Commandl_click() Command2.Enabl ed=True Command3.Enabl ed=False End SubC.Private Sub Commandl_C1ick() Command2.Enabled=True Command3.ViSible=False End SubD.Private Sub Commandl_C1ick() Coiihmand2.Vi s ible:True Command3.Enabled=False End Sub
考题
窗体上添加有3个命令按钮,分别命名为Command1、Command2和Command3。编写Commandl的单击事件过程,完成的功能为:当单击按钮Command1时,按钮Command2可用,按钮Command3不可见。以下正确的是( )。A.Private Sub Command1_C1ick() Command2.Visible=True Command3.Visible=False End SubB.Private Sub Commandl_C1ick() Command2.Enabled=True Command3.Enabled=False End SubC.Private Sub Conunand1_C1ick() Command2.Enabled=True Command3.Visible=False End SubD.Private Sub Command1_Click() Command2.Visible=True Command3.Enabled=False End Sub
考题
下面程序的运行结果是 ______ 。程序的功能是 _______ 。Public Function myfun(m,n)Do while m>nDo while m>n:m=m-n:LoopDo While n>m:n=n-m:LoopLoopMyfun=mEnd FunctionPrivate Sub Command1_Click()Print myfun(15,15)End Sub
考题
单击窗体上Com mand l命令按钮时,执行如下事件过程: Private Sub Commandl_C1ick() a$="software and hardware" b$=Right(a$,8) C$=Mid(b$,1,8) Msgbox c$ End sub 则在弹出的信息框的标题栏中显示的信息是( )。A.software and hard WaJeB.softwareC.hardwareD.and
考题
若有如下程序: int sub() {static int n=1; int x=1; x*=n;n++; return x; } main() {int n,t=1; for(n=1;n<6;n++)t*=sub(); printf("%d\n",t); } 则程序运行后的输出结果是( )A.15B.120C.34560D.-30976
考题
以下能够正确计算n!的程序是( )。A.Pfivate Sub Commgld1_LClick() n=5:x=1 Do x=x*1 i=i+1 Loop Whilei<nB.Private Sub Command1_Click() n=5:x=1:i=1 Do x=x*1 i=i+1 Loop Whilei<n Print x End SubC.Pfivate Sub Command1_ C1ick() n=5:x=1:i=1 Do X=X*1 i=i+1 Loop While i<=nD.Private Sub Command1_C1ick() n=5:x=1:i=1 Do X=X*1 i=i+1 Loop While i>n Print x End Sub
考题
在窗体中添加一个命令按钮,编写如下程序: Private Sub Sub1(p,m,n) p=p+1:m=m+1:n=n+1 Print "sub1:";p;m;n End Sub Private Sub Command1_Click() a1=1:b=2:c1=3 Call Sub1(a,b1+3,c1) Print"Main:";a1;b1;c1 End Sub 程序运行后,输出结果为A.Sub: 2 6 4 Main: 2 6 4B.Sub: 2 6 4 Main: 2 6 4C.Sub: 2 6 4 Main: 1 2 3D.Sub: 2 6 4 Main: 2 2 3
考题
在窗体上画1个命令按钮和1个文本框,其名称分别为Commandl和Textl,然后编写如下代码:Dim Save All As StringPrivate Sub Commandl_C1iCk()Text1.Text=Left(UCase(SaveAU),4)End SubPrivate Sub Textl_KeyPress(KeyAscii As Intege)SaveA11=Save All+Chr(KeyAscii)End Sub程序
考题
过程通过参数传递将一个参数传递给子过程A,并返回一个结果,下列子过程定义中正确的是()A、Sub A(m+1,n+2)B、Sub A(ByValm!,ByValn!)C、Sub A(ByValm!,n+2)D、Sub A(ByValm!,n!)
考题
单选题给定下列FORTRAN子程序如下: SUBROUTINE SUB(K,A) A=SQRT(K*K+1.0) END 下列调用语句中正确的是()A
CALL SUB(N,N)B
CALL SUB(X,X)C
CALL SUB(N,X*X)D
CALL SUB(11,X)
考题
单选题给定子例行程序如下 SUBROUTINE SUB(K,A) B=K+2 A=A+B END 下列调用语句中正确的是()A
CALL SUB(N,N)B
CALL SUB(X,X)C
CALL SUB(N+2,X)D
CALL SUB(N,X+3)
热门标签
最新试卷