排排看(p20)

public class paixu{
public static void main(String[] args){
int x=3;
if(x>2){
System.out.print("a");
}
x=x-1;
System.out.print("-");
if(x==2){
System.out.print("b c");
}
x=x-1;
System.out.print("-");
while(x>0){
if(x==1){
System.out.print("d");
x=x-1;
}
}
}
}

posted @ 2018-08-26 14:29  CHERRYL  阅读(142)  评论(0编辑  收藏  举报