单选题:有定义语句“int a=l, b=2, c=3, x;”, 则以下各程序段执行后, x的值不为3的是()。
有定义语句“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;
答案:C
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;
答案:C