A: message one
B: message two
C: message three
D: message four
举一反三
- 以下程序段的输出结果为 【14】 。int x=0,y=4,z=5;if(x>2)if(y<5)System. out. println("Message one");elseSystem. out . println("Message two");else if(z>5)System. out. println("Message three");elseSystem. out. println("Message four");
- 下列程序的运行结果? public class Test { public static void main(String a[]) { int x=3,y=4,z=5; if (x>3) { if (y<2) System.out.println("show one"); else System.out.println("show two"); } else { if (z>4) System.out.println("show three"); else System.out.println("show four"); } } }
- 下列程序段运行后的结果是()int x = 1;int y = 2;x += y + y;if (x < 5 && y <= 4) {System.out.println("1");} else if (x >= 5 || y > 4) {System.out.println("2");} else {System.out.println("error");} A: 无法编译 B: 程序报错 C: 1 D: 2
- 以下程序段的输出结果是_________。 int x = 5, y = 6, z = 4; if (x + y > z && x + z > y && z + y > x) System.out.println("三角形"); else System.out.println("不是三角形");
- 下列程序的运行结果是______。 public class Test { public static void main (String[] args) { int x=3, y=4, z=5; if (x>3) { if (y<2) System.out.print ("show one"); else System.out.print ("show two"); } else{ if (z>4) System.out.print ("show three"); else System.out.print ("show four"); } } } A: show one B: show two C: show three D: show four
内容
- 0
设x=2以及y=3,下面代码的输出结果是。if (x >; 2)if(y >; 2){int z = x + y;System.out.println("z is " + z) ;}else{System.out.println("x is " + x) ;} A: x is 2 B: z is 5 C: x is 5 D: 无输出
- 1
请看下面的程序代码,当 n 为( )值时,程序段将输出字符串 second。 [br][/br] switch(n) { [br][/br] case 0: System .out .println(“first”); [br][/br] case 1: [br][/br] case 2: System .out .println(“second”); break; [br][/br] default: System .out .println(“end”); [br][/br] }(2.0) A: 0 B: 1 C: 2 D: 以上都可以
- 2
Decision on whether the message is right or wrong should at least come after()what the message is. A: putting out B: turning out C: working out D: running out
- 3
A ( ) system also known as voice message or voice bank.
- 4
给定以下函数def nPrint(message, n): while n > 0: print(message) n -= 1 引用nPrint("A message", k)后,k的值是多少? k = 2 nPrint(n = k, message = "A message") A: 0 B: 1 C: 2 D: 3