网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
程序段如下,程序运行后消息框显示的结果是______。 Dim x%, n% x = 0 Do While x < 50 x = (x + 2) * (x + 3) n = n + 1 Loop MsgBox(n & " " & x)
A.2 72
B.2 50
C.3 72
D.3 50
参考答案和解析
1
更多 “程序段如下,程序运行后消息框显示的结果是______。 Dim x%, n% x = 0 Do While x < 50 x = (x + 2) * (x + 3) n = n + 1 Loop MsgBox(n " " x)A.2 72B.2 50C.3 72D.3 50” 相关考题
考题
在窗体上画两个文本框Text1和Text2,一个命令按钮Command1,请阅读下列程序段: Private Sub Command1_Click() x=0 Do Until x=50 X=(x+4)﹡(x+3) N=n+1 Loop Text1.Text=Str(n) Text2.Text=str(x) End Sub运行程序后,单击命令按钮,在两个文本框中显示的值分别为A. 1和0 B. 2和240 C. 3和50 D. 4和168
考题
在窗体上画两个文本框(其Name属性分别为Text1和Text2)和一个命令按钮(真Name属性为Command1),然后编写如下事件过程: Private Sub Command1_Click() x=0 Do While x<50 x=(x+2)*(x+3) n=n+1 Loop Text1.Text=Str (n) Text2.Text=Str (x) End Sub程序运行后,单击命令按钮,在两个文本框中显示的值分别为______ 。A.1和0B.2和72C.3和50D.4和168
考题
假定有如下事件过程: Privte Sub Form_Click0 Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是( )。A.81 4B.56 3C.28 1D.243 5
考题
假定有如下事件过程:Private Sub Form_Click()Dim x As Integer, n As Integerx = 1n = 0Do While x 28x = x * 3n = n + 1LoopPrint x, nEnd Sub程序运行后,单击窗体,输出结果是( )。A.81 4B.56 3C.28 1D.243 5
考题
下面程序的执行结果是【】。include void main(){int n=0,x=0;do{n++;if(n%3==2do{n++;if(n%3==2n%5==3n%7==2)x=1;}while(x!=1);cout<<"n=" <<n<<end1;}
考题
有如下程序 public class Sun { public static void main(String args[ ]) { int x=0; int n=0; while(x50) { x=(x+2)*(x+3); n=n+1; } System.out.println(n+"和"+x); } } 上述程序的运行结果是( )。A.1和0B.2和72C.3和50D.4和168
考题
以下能够正确计算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
考题
以下能够正确计算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
考题
运行下列程序: Private Sub Command1_Click() x = 0 Do While x<10 x=x * x + 1 y=y+x Loop MsgBox y End Sub 单击Command1命令按钮后,弹出的消息对话框中会显示A.5B.8C.26D.34
考题
以下能够正确计算n! 的程序是( )。A.Private Sub Command1_Click( ) n=5:x=l 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_Cliek( ) n:5:x=1:i=1 Do x=x* i i:i+1 Loop While i < = n Print x End SubD.Private Sub Command1_Cliek( ) n=5:x:1:i=1 Do x=x*i i=j+1 Loop While i > n Print x End Sub
考题
在窗体上画两个文本框(名称分别为Text1和Text2)和—个命令按钮(名称为Cotranand1),然后编写如下事件过程:Private Sub Command1_Click() x=0 Do While x<50 x=(x+2)*(x+3) n=n+1 Loop Text1.Text=Str(n) Text2.Text=Str(x)End Sub 程序运行后,单击命令按钮,在两个文本框中显示的值分别为______。A.1和0B.2和72C.3和50D.4和168
考题
在窗体上画两个名称分别为Text1、Text2的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<20 x=x*3 n=n+1 Loop Text1.Text=Str(x) Text2.Text=Str(n) End Sub 程序运行后,单击命令按钮,在两个文本框中显示的值分别是 ______。A.15和1B.27和3C.195和3D.600和4
考题
假定有如下事件过程: Privte Sub Form_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果是A.81 4B.56 3C.28 1D.243 5
考题
下列程序段的执行结果为______。 x = 0: y = 1 z = 1: n = 0 Do x = x + y + z n = n + 1 Loop While x < 10 Print x; nA.10 5B.x nC.9 5D.10 6
考题
以下能够正确计算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
考题
在窗体上画两个名称为Tcxt1、Text2的文本框和一个名称为Command1的命令按钮,然后编写如 下事件过程: Private Sub Command1 Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<20 x=x*3 n=n +l Loop Text1.Text=Str(x) Text2.Text=Str(n) End Sub 程序运行后,单击命令按钮,在两个文本框中显示的值分别是( )。A.9和2B.27和3C.195和3D.600和4
考题
假定有如下事件过程: Phvate Sub Form_Click() DimXASInteger,nASInteger x=1 n=0 Do While x<28 x=x*3 n=n+1 Loop Ptint x,n End Sub 程序运行后,单击窗体,输出结果为______。A. 81 4B.56 3C.28 1D.243 5
考题
有如下函数:Private Function firstfunc(x As Integer, y As Integer) As Integer Dim n As Integer Do While n <= 4 x=x +y n=-+1 Loop firstfunc = x End Function调用该函数的事件过程如下:Private Sub Command1_lick() Dim x As Integer Dim y As Integer Dim n As Integer Dim z As Integer x=1 y=1 For n = 1 To 3 z = firstfunc(x, y) Next n Print z End Sub该事件过程的执行结果是 ______。A.1B.3C.16D.9
考题
在窗体上画两个名称为Text l、Text 2的文本框和一个名称为Command l的命令按钮,然后编写如下事件过程: Private Sub Commandl_Click() Dim x As Integer,n As Integer x=1 n=0 Do While x<20 x=x*3 n=n+l Loop Textl.Text=Str(x) Text2.Text-Str(n) End Sub 程序运行后,单击命令按钮,在两个文本框中显示的值分别是( )。A.9和2B.27和3C.195和3D.600和4
考题
在窗体上画两个名称为Text1、Text2的文本框和一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1 Click() Dim x As Integer, n As Integer x=1 n=0 Do While x<20 x=x*3 n=n+1 Loop Text1.Text=Str(x) Text2.Text=Str(n) End Sub 程序运行后,单击命令按钮,在两个文本框中显示的值分别是( )。A.9和2B.27.和3C.195和3D.600和4
考题
以下能够正确计算n!的程序是______。A.Private Sub Commeadl_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 Whilei<=n Print x End SubD.Private Sub Commsndl_Click() n=5: x=1: i=1 Do x=x*i i=i+1 Loop While i>n Print x End Sub
考题
阅读下面的程序; Function Func(x As Integer,y As Integer)As Integer Dim n As Integer Do While n < = 4 x=x + y n = n + 1 Loop Func=x End Function Private Sub Command1_Click() Dim x As Integet, y As Integer Dim n As Integer,z As Integer x=1 y=1 For n = 1 To 6 z=Func(x,y) Next n Print z End Sub 程序运行后,单击命令按钮,输出的结果为.A.16B.21C.26D.31
考题
以下能够正确计算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 Form_Cilck() Dim x As Integer,n As Integer x=1 n=0 Do While x<28 X=X*3 n=n+1 Loop Print x,n End Sub 程序运行后,单击窗体,输出结果为______。A.81 4B.56 3C.28 1D.243 5
考题
在窗体上画两个文本框(其NAME属性分别为TEXT1和TEXT2)和一个命令按钮(其NAME属性为COMMAND1),然后编写如下事件过程: PRIVATE SUB COMMAND1_CLICK( ) X=0 N=0 DO WHILE X<50 x=(x+2) * (x+3) N=N+1 LOOP TEXT1=STR(N) TEXT2=STR(X) END SUB程序运行后,单击命令按钮,在两个文本框中显示的值分别为( )。A.1和0B.2和72C.3和50D.4和168
考题
以下能够正确计算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
考题
单选题有下列程序段:X=1 n=0 Do While x<20 x=x*3 n=n+1 Enddo ?x,n 该程序段的执行结果为()。A
15和1B
27和3C
195和3D
600和4
热门标签
最新试卷