if(score>80){
if(sex.equals("女")){
System.out.println("进入女子组决赛");
}else{
System.out.println("进入男子组决赛");
}
}else{
System.out.println("回家");
}
}
}
if(sex.equals("女")){
System.out.println("进入女子组决赛");
}else{
System.out.println("进入男子组决赛");
}
}else{
System.out.println("回家");
}
}
}
2015-06-24
if(age>60){
System.out.println("老年");
}else if (age>40){
System.out.println("中年");
}else if (age>18){
System.out.println("少年");
}else{
System.out.println("未成年");
}
System.out.println("老年");
}else if (age>40){
System.out.println("中年");
}else if (age>18){
System.out.println("少年");
}else{
System.out.println("未成年");
}
2015-06-24
three=one+two;three=three+one;three-=one;three*=one; three/=one; three%=one; System.out.println("three=one+two==>"+three); System.out.println("three+=one==>"+three);System.out.println("three=one==>"+three);System."three*=one==>"+three);System("three/=one==>"+three);System.("three%=one==>"+three);
2015-06-24
switch(today){
case '一' | '三' | '五':
System.out.println("包子");
break;
case '二' | '四' | '六':
System.out.println("油条");
break;
default:
System.out.println("主席套餐");
}
case '一' | '三' | '五':
System.out.println("包子");
break;
case '二' | '四' | '六':
System.out.println("油条");
break;
default:
System.out.println("主席套餐");
}
2015-06-24
if(score>80)
{
if(sex.equals("男"))
{
System.out.println("进入男子组决赛");}
else{
System.out.println("进入女子组决赛");
}
}
{
if(sex.equals("男"))
{
System.out.println("进入男子组决赛");}
else{
System.out.println("进入女子组决赛");
}
}
2015-06-24