请您将下面的代码排排看,输出结果是:a-b c-d
A: if(x == 1){ System.out.print("d"); x = x - 1;}
B: if(x == 2){ System.out.print("b c");}
C: class Shuffle1{ public static void main(String [] args){
D: if (x > 2){ System.out.print("a");}
E: int x = 3;
F: x = x - 1;ystem.out.print("-");
G: while(x > 0){
A: if(x == 1){ System.out.print("d"); x = x - 1;}
B: if(x == 2){ System.out.print("b c");}
C: class Shuffle1{ public static void main(String [] args){
D: if (x > 2){ System.out.print("a");}
E: int x = 3;
F: x = x - 1;ystem.out.print("-");
G: while(x > 0){
举一反三
- 下面代码的输出是什么? x = 0 while x < 4: x = x + 1 print("x is", x) A: x is 0 B: x is 1 C: x is 2 D: x is 3 E: x is 4
- 阅读下面的程序 public class Test { public static void main(String[] args) { for(int x = 0 ; x <=3 ; x++){ continue; System.out.print(x%2); } } }
- 下面代码的输出结果是哪个选项?x = 0 if x < 4: x = x + 1 print("x is", x) A: x is 0 B: x is 1 C: x is 2 D: x is 3 E: x is 4
- 下面代码输出的x的值为( ) x = 1 while x < 3: break x = x + 1 print(x) A: 1 B: 2 C: 3 D: 4
- 执行下面代码后,最后输出的x值为( ) x = 1 while x < 3: x = x + 2 print(x) A: 1 B: 2 C: 3 D: 4