给出下面程序段: if(x>0){System.out.println("Hello.");} else if(x>-3){ System.out.println("Nice to meet you!");} else{System.out.println("How are you?");} 若打印字符串"How are yoh?",则x的取值范围是( )。
A.x>0
B.x>-3
C.x≤-3
D.x≤0&x>-3
第1题:
给出下面程序段: if(x>0){System.out.println("Hello.");} else if(x>-3){System.out.println("Nice to meet you!");} else{System.out.println("How are you?");} 若打印字符串“How are you?”,则x的取值范围是
A.x>0
B.x>-3
C.x<=-3
D.x<=0&x>-3
第2题:
给出下列代码片段: if(x>0){System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 当x处于( )范围时打印字符串"second"。
A.x>0
B.x>-3
C.-3<x<=0
D.x<=-3
第3题:
给出下面代码段:x处于什么范围时打印字符串“second”。 ( ) public class forLoopStatement { public static void main(String[]args) { int x=______;//给x赋值 if(x>0){System.out.println("first");} else if(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
第4题:
给出下列代码片断: if(x>0) {System.out.println("first");} else if(x>-3){System.out.println("second");} else{System.out.println("third");} 请问x处于什么范围时将打印字符串“second”?( )
A.x>0
B.x>-3
C.x<=3
D.x<=0&x>-3
第5题:
给出下面程序段: if(x>0) {System.out.printin("Hello.");} else if(x>-3) { System.out.println("Nice to meet you!");} else{System.out.println("How are you?");} 若打印字符串"How are you?",则x的取值范围是( )。
A.x>0
B.x>-3
C.x≤-3
D.x≤0&x>-3