首页 > 大学专科> 电子信息
题目内容 (请给出正确答案)
[主观题]

以下程序段的输出结果为 ______。 int x=0,y=4,z=5; if(x>2){ if(y<5){ System.o

以下程序段的输出结果为 ______。 int x=0,y=4,z=5; if(x>2){ if(y<5){ System.out.println("Message one"); } else{ System.out.println("Message two"); } } else if(z>5){ System.out.println("Message three"); } else{ System.out.println("Message four"); }

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“以下程序段的输出结果为 ______。 int x=0,y=…”相关的问题
第1题
以下程序段的输出结果为( )。 main() { char x='A'; x=(x>='A'&&x<='Z')?(x+32):x; printf("%c\n",x); }

A.A

B.a

C.Z

D.z

点击查看答案
第2题
以下程序段的输出结果为_____。 class Cruncher{ void crunch(int i) { System.out.p

以下程序段的输出结果为_____。 class Cruncher{ void crunch(int i) { System.out.println("int"); } void crunch(String s){ System.out.println("String"); } public static void main(String args[]){ Cruncher crun=new Cruncher(); char ch="p": crun.crunch(ch); } }

点击查看答案
第3题
以下程序段的输出结果为( )。 main() { int x=1,a=0,b=0; switch(x) { case 0:b++; case 1:a++; case 2:a++:b++; } printf("a=%d,b=%d\n",a,b); }

A.a=2,b=1

B.a=1,b=1

C.a=1,b=0

D.a=2,b=2

点击查看答案
第4题
执行以下程序段 a$="abbacddcba"Fori=6To2Step-2 X=Mid(a,i,i) Y=Left(a,i) z=Right(a,i

执行以下程序段

a$="abbacddcba"

For i=6 To 2 Step -2

X=Mid(a,i,i)

Y=Left(a,i)

z=Right(a,i)

z=UCase(X & Y & z)

Next i

Print z

输出结果为()。

A.ABA

B.BBABBA

C.ABBABA

D.AABAAB

点击查看答案
第5题
执行以下程序段,并输入1.23,则程序的输出结果应是【 】。 N=Str(InputBox("请输入一个实数:")) p

执行以下程序段,并输入1.23,则程序的输出结果应是【 】。 N=Str(InputBox("请输入一个实数:")) p=InStr(N,".") Print Mid(N,p)

点击查看答案
第6题
若所用变量都已正确定义,以下程序段的输出结果_____。for(i=1;i<=5;i++);printf("OK/n");
若所用变量都已正确定义,以下程序段的输出结果_____。for(i=1;i<=5;i++);printf("OK/n");

点击查看答案
第7题
下列程序段的输出结果为__________。 int a=2; switch (a) { case2: System.

下列程序段的输出结果为__________。 int a=2; switch (a) { case2: System.out.print("Value is2."); case3: System.out.pritln("Value is3."); break; default: System.out.println("end"); break: }

点击查看答案
第8题
下列程序段的输出结果为【 】。 public class Test { void printValue(int m) {

下列程序段的输出结果为【 】。 public class Test { void printValue(int m) { do { Systern.out,println("The value is "+m); } while(-m>10); } public static void main(String arg[]){ int i=10; Test t=new Test(); t.print Value(i); } }

点击查看答案
第9题
执行下面的程序段,输出结果为【 】。 public class Q { public Static Void main(String arg

执行下面的程序段,输出结果为【 】。 public class Q { public Static Void main(String args[]) { int anar[]=new int[5]; System.out.println(anar[0]); } }

点击查看答案
第10题
若score分别赋值为99和77,下面程序段分别输出什么结果?ifscore>=90:print('A')elifsco

若score分别赋值为99和77,下面程序段分别输出什么结果?

ifscore>=90:

print('A')

elifscore>=80:

print('B')

elifscore>=70:

print('C')

elifscore>=60:

print('D')

else:

print('F')

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