首页 > 自考
题目内容 (请给出正确答案)
[主观题]

给出下列代码段:if(x>4){System.out.printiln("Test 1");} else if(x>9){System.out

给出下列代码段:if(x>4){System.out.printiln("Test 1");} else if(x>9){System.out

给出下列代码段:

if(x>4){

System.out.printiln("Test 1");

} else if(x>9){

System.out.printin("Test 2");

}else {

System.out.printin("Test 3");

}

哪一个范围的x取值可以产生输出信息:"Test3"()。

A、以上均不对

B、5到9之间

C、大于等于10

D、小于0

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“给出下列代码段:if(x>4){System.out.pri…”相关的问题
第1题
给出下面代码段:x处于什么范围时打印字符串“second”。 () public class orLoopStatemen

给出下面代码段:x处于什么范围时打印字符串“second”。 () public class orLoopStatement { public static void main(String[]args) { int x=______;//给x赋值 i(x>0){System.out.println("irst");} else i(x>-3){System.out.println("second");} else{System.out.println("third");} } }

A.x>0

B.x>-3

C.x<=-3

D.x<=0&x>-3

点击查看答案
第2题

执行下列代码后结果是多少?

int x,a=2,b=3,c=4;x=++a+b+++c++;x=(),a=(),b=(),c=()。

点击查看答案
第3题
运行下方代码段,输出的是()。n1, n2 = 3, 4if n1 < n2:n1, n2 = n2, n1print(n1, n2)

A.3 4

B.4 3

点击查看答案
第4题
运行下方代码段,下列叙述中正确的是()。age = int(input("年龄:"))if age < 4:print("免费")elif age < 18:print("4元")else:print("8元")

A.输入为4,输出为免费

B.输入为5,输出为免费

C.输入为18,输出为4元

D.输入为19,输出为8元

点击查看答案
第5题
假定所有变量均已正确说明,下列程序段运行后x的值是()a=b=c=0;x=60;if(!a)x--;else if(b)if(c)x=3;else x+=4;

A.3

B.4

C.60

D.63

点击查看答案
第6题
下列程序段的执行结果是()。x = Int(Rnd + 4) Select Case xCase 5 Print "优秀" Ca

A.优秀

B.良好

C.通过

D.不通过

点击查看答案
第7题
下列VB程序段执行后变量y的值为()x=20if x>=100theny=5*xelsey=4*xend ifprint y

A.20

B.40

C.100

D.80

点击查看答案
第8题
以下代码的输出结果是什么? class Foo{ public static void main(String args[]){ int x=4,

以下代码的输出结果是什么? class Foo{ public static void main(String args[]){ int x=4,j=0; switch(x){ case 1:j++; case 2:j++; case 3:j++; case 4:j++; case 5:j++; break; default:j++; } System.out.println(j); } }()

A.1

B.2

C.3

D.编译错误

点击查看答案
第9题
下列语句段中,正确的是()。

A.struct {int x; float y; int a[2]; unsigned b[3]; char name[10]; };

B.structstu { unsigneda[3]; unsigned b[4]; }x; int*p=&x.a;

C.struc tsu { int a; float x[4]; }y={1,1.0}; floatdat a=y.x;

D.stmct nd {int a,b; unsigned c[2]=5; };

点击查看答案
第10题
代码段如下:dim N as integerN = 2N = N + 1Print N以上代码执行后,输出结果为()

A.1

B.2

C.3

D.4

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改