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

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

当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; else x = 3; else x = 6; else x = 7;

A.1

B.2

C.3

D.4


参考答案和解析
2
更多 “当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; else x = 3; else x = 6; else x = 7;A.1B.2C.3D.4” 相关考题
考题 有下面程序段: 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

考题 ( 19 )若 x 和 y 是程序中的两个整型变量,则下列 if 语句中正确的是A ) if(x==0) y=1; else y=2;B ) if(x==0) then y=1 else y=2;C ) if(x==0) y=1 else y=2;D ) if x==0 y=1; else y=2;

考题 假定所有变量均已正确说明,下列程序段运行后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

考题 下面程序段中正确的是()。A.If x=2 Then y=3B 下面程序段中正确的是( )。A.If x<0 Then y=0 If x<1 Then y=1 If x<2 Then y=2 If x>=2 Then y=3B.If x>=2 Then y=3 If x>1 Then y=2 If x>=0Then y=1 If x>0 Then y=0C.If x<0 Then y=0 Else If>=0Then y=1 Else y=3 End IfD.If x>=2 Then y=3 Else If>=1 Then y=2 Else y=0 End If

考题 当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;

考题 下列程序的运行结果是()。includemain(){int x=5,a=1,b=2,c=5,d=0; if(a 下列程序的运行结果是( )。 #include<stdio.h> main() { int x=5,a=1,b=2,c=5,d=0; if(a<B) if(b!=3) if(!C) x=1; else if(D) x=1; else x=-1; printf("%d",x); }A.-1B.0C.1D.不确定的值

考题 当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

考题 有定义语句:int a=1,b=2,c=3,x;,则以下选项中各程序段执行后,x的值不为3的是A.if(c<a) x=1; else if(b<a) x=1; 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=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=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

考题 有以下程序#includemain(){ int x=1,y=0;if(!x) y++;else if(x==0)if (x) y+=2;else y+=3;printf(%d\n,y);}程序运行后的输出结果是A.3B.2C.1D.0

考题 有定义语句: "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;

考题 与y=(x>0? 1:x0)y=1 else if(x 与y=(x>0? 1:x<0? -1:0);的功能相同的if语句是A.if(x>0)y=1 else if(x<0)y=-1; else y=O;B.if(x) if(x>0)y=1; else if(x<0)y=-1;C.y=-1; if(x) if(x>0)y=1; else if(x==0)y=0; else y=-1;D.y=0; if(x>=0) if(x>0)y=1; else y=-1;

考题 当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

考题 与y=(x>0?1:x0)y=1; else if(x 与y=(x>0?1:x<0?-1:0):的功能相同的if语句是( )A.if(x>0)y=1; else if(x<0)y=-1; else y=0; else y=0;B.if(x) if(x>0)y=1; else if(x<0)y=-1;C.y=-1; if(x) if(x>0)y=1; else if(x==0)y=0; else y=-1;D.y=0; if(x>=0) if(x>0)y=1; else y=-1:

考题 有一函数:以下程序段中不能根据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

考题 有定义语句: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的位是( ) 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;

考题 单选题有定义语句:"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;