网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

当a=6,b=14,c=8,d=4时,执行下面程序段后,x的值是(). if(a<b) if(c<d) x=4 ; else if(a<c) if(b<d)x=6; else x=8; else x=14; else x=27;

A.6

B.27

C.4

D.8


参考答案和解析
B 本芷嗵考查VBA中循环和整除的知识。显然循环会执行10次,所以这个问题主要需要搞清楚每次循环累加的是什么数值。注意到每次累加的是i整除5的结果,i=20时累加一个4,i=18、16时累加两个3+i=14、12、10时累加三个2,i=8、6时累加两个1。
更多 “当a=6,b=14,c=8,d=4时,执行下面程序段后,x的值是(). if(a<b) if(c<d) x=4 ; else if(a<c) if(b<d)x=6; else x=8; else x=14; else x=27;A.6B.27C.4D.8” 相关考题
考题 有下面程序段: a:=false;b:=false;c:=false; x:=15; if a then x:=x0 else if b then x:=x-5 else if c then x:=20 else x:=25; 假设所有变量均已说明,程序运行后x的值是( ) 。 A25B20C15D5

考题 运行下面程序后,正确的输出结粜是( )。 public class Sun { public static void main(String args[]) { int x=6; if(x>6) System.out.printin("x>6"); else if(x<8) System.out.println("X<8"); else if(x==6) System.out.println("x=6"); } }A.x<8x=6B.x<8C.x=6D.x<8或x=6

考题 假定所有变量均已正确说明,下列程序段运行后x的值是( )。a=b=c=0;x=12;if(!a)x--;else x=5;if(C) x=3;else x=4;A.11B.4C.12D.3

考题 假定所有变量已正确说明,下列程序段运行后,x的值是 ( ) a=b=c=0;x=35; if (! a) x- -; else if (b); if (c) x=3; else x=4;A.34B.4C.35D.3

考题 当a=1,b=3,c=5,d=4时,执行下面一段程序后,x的值为______。if (ad) x=1;else if(a 当a=1,b=3,c=5,d=4时,执行下面一段程序后,x的值为______。if (a<6) if(c>d) x=1; else if(a<c) if (b>l) x=2; else x=3; else x=6; else x=7;A.1B.2C.3D.6

考题 有定义:int a=1,b=2,c=3,x;则以下选项中各程序段执行后,x的值不为3的是( )。A.if(c<a) x=1; else if(b<a) x=2; else x=3;B.if(a<3) x=3; else if(a<2) x=2; else x=1;C.if(a<3) x=3; if (a<2) x=2; if (a<1) x=1;D.if (a<b) x=b; if (b<c) x=c; if (c<a) x=a;

考题 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。if (a<b) if (c<d) x=1; elseif (a<c)if (b<d) x=2;else x=3;else x=6;else x=7;A.1B.2C.3D.6

考题 有定义语句:int a=1,b=2,c=3,x;,则以下选项中各程序段执行后,x的值不为3的是A.if (c<a) x=1; else if (b<a) x=2; else x=3;B.if (a<3) x=3; else if (b<a) x=2; else x=1;C.if (a3) x=3; if (a2) x=2; if (a1) x=1;D.if (a<b) x=b; if (b<c) x=c; if (c<a) x=a;

考题 运行下面程序后,正确的输出结果是 ______。Private Sub Command1_ Click() x = 6 if x >6 then Print "x>6": Else if x <8 then Print "x<8"; Else if x = 6 then Print "x=6": End if End if End ifEnd SubA.x<8 x=6B.x<8C.x=6D.x<8或x=6

考题 当a=4,b=5,c=7,d=6时,执行下面一段程序: if(a<B)if(c<D)x=1; else if(a<C)if(b<C)x=2: else x=3; else x=4; else x=5; 程序执行后,x的值为( )。A.1B.2C.3D.4

考题 当Command1_Click事件发生时,窗体上显示的内容是 ______。 Private Sub Command1_Click() Dim a As Integer,b As Integer,c As Integer If a = 0 Then x = x-1 Else If b <> 0 Then x = 7 Else x=x+8 End If If c <> 0 Then x = x-3 Else x = 4 End If Print x End SubA.7B.8C.4D.3

考题 当a=1、b=2、c=3、d=4时,执行下面程序段后,x的值是( )。 if(a<B)if(c<D)x=1; else if(a<C)if(b<D)x=2: else x=3: else x=6: else x=7:A.1B.6C.3D.2

考题 假定所有变量均已正确说明,下列是程序段运行后x的值是 ( ) a=b=C=O;x=35; if(! a)x- -; else if(b); if(c)x=3; else x=4;A.34B.4C.35D.3

考题 假定所有变量均已正确说明,下列程序段运行后x的值是 a=d=c=0;x=35; if(! a) x=-1, else if(b) ; if(c) x=3; else x=4;A.34B.4C.35D.3

考题 设int i=10,j=11,k=12,x=0;执行语句: if(i>5) if(j>100) if(k>11) X=3; else x=4; else x=5; 后x的值是( )。A.0B.3C.4D.5

考题 有定义语句: "int a=1, b=2, c=3, x;" , 则以下选项中各程序段执行后,x的值不为3A.if(c<a)x=1; else if(b<a)x=2: else x=3;B.if(a<3)x=3: else if(a<2)x=2; else x=1;C.if(a<3) x=3; if(a<2) x=2; if(a<l)x=1;D.if(a<b) x=b; if(b<c) x=c if(c<a) x=a;

考题 当a=1,b=3,c=5,d=4时,执行下面一段程序后,x的值为______。 if(a<b) if(c<d) x=1; else if(a<c) if(b<d) x=2; elsex=3; elsex=6; elsex=7;A.1B.2C.3D.6

考题 有一函数:以下程序段中不能根据x值正确计算出y值的是A.if(x0)y=1; else if(x= =0)y=0; else y=-1;B.y=0; if(x0)y=1; else if(x0)y=-1;C.y = 0; if (x = 0) if (x0) y = 1; else y = -1;D.if ( x = 0) if ( x0)y = 1; else y = 0; else y = -1;

考题 当a=1、b=3、c=5、d=4时,执行下面一段程序: if(a<B) if(c<D) x=1; else if(a<C) if(b<D) x=2; else x=3; eles x=6; else x=7;程序执行后,x的值为( )A.1B.2C.3D.6

考题 下面程序执行的结果是( )。 CLEAR X=5 Y=6 Z=7 IF X>Y IF Z>8 X=X+Y ELSE X=X+Z ENDIF ENDIF ?XA.5B.11C.12D.13

考题 有定义语句:int a=1, b=2, c=3, x;,则以下选项中各程序段执行后,x的值不等于3的是______。A.if(c<a)x=1; else if(b<a)x=2; else x=3;B.if(a<3)x=3; else if(a<2)x=2; else x=1;C.if(a<3)x=3; if(a<2)x=2; if(a<1)x=1;D.if(a<b)x=b; if(b<c)x=c; if(c<a)x=a;

考题 当a=1、b=3、c=5、d=4时,执行下面一段程序后,x的值为______。 If a<b Then If c<d Then x=1 Else If a<c Then If b<d Then x=2 Else x=3 End If Else x=6 End If End If Else x=7 End IfA.1B.2C.3D.6

考题 假定所有变量均已正确定义,下列程序段运行后X的值是( ) a=b=c=0; x=35; if(!a)x--; else if(b);if(c)x=3;else x=4;A.34B.4C.35D.3

考题 执行下列程序段后,x的位是( ) int a=8,b=7,c=6,x=1; if(a6)if(b7)if(c8)x=2;else x=3;A.0B.1C.2D.3

考题 以下不能实现符号函数y=sgn(x)的程序段是()。A、if x0 then y=1 else if x=0 then y=0 else y= -1B、if x0 then y=1 else if x0 then y= -1 else y=0C、if x=0 then if x=0 then y=0 else y= -1 else y=1D、if x0 then if x0 then y= -1 else y= 1 else y=0

考题 有定义语句:"inta=1,b=2,c=3,x;",则以下选项中各程序段执行后,x的值不为3()A、if(c<a)x=1; else if(b<a)x=2:else x=3;B、if(a<3)x=3:else if(a<2)x=2; else x=1;C、if(a<3) x=3;if(a<2) x=2;if(a<l)x=1;D、if(a<b) x=b;if(b<c) x=c;if(c<a) x=a;

考题 单选题以下不能实现符号函数y=sgn(x)的程序段是()。A if x0 then y=1 else if x=0 then y=0 else y= -1B if x0 then y=1 else if x0 then y= -1 else y=0C if x=0 then if x=0 then y=0 else y= -1 else y=1D if x0 then if x0 then y= -1 else y= 1 else y=0

考题 单选题有定义语句:"inta=1,b=2,c=3,x;",则以下选项中各程序段执行后,x的值不为3()A if(c<a)x=1; else if(b<a)x=2:else x=3;B if(a<3)x=3:else if(a<2)x=2; else x=1;C if(a<3) x=3;if(a<2) x=2;if(a<l)x=1;D if(a<b) x=b;if(b<c) x=c;if(c<a) x=a;